UNPKG

geostyler

Version:
47 lines (46 loc) 1.56 kB
var l = Object.defineProperty; var f = (n, r, e) => r in n ? l(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e; var m = (n, r, e) => f(n, typeof r != "symbol" ? r + "" : r, e); import o from "ol/geom/Point"; import i from "ol/geom/LineString"; import c from "ol/geom/Polygon"; class u { } m(u, "getSampleGeomFromStyle", (r, e) => { const t = []; return r.rules.forEach((s) => { s.symbolizers.forEach((a) => { t.includes(a.kind) || t.push(a.kind); }); }), t.map((s) => { switch (s) { case "Mark": case "Icon": case "Text": return new o([7.10066, 50.735851]).transform("EPSG:4326", e); case "Fill": return new c([[ [7.1031761169433585, 50.734268655851345], [7.109270095825195, 50.734268655851345], [7.109270095825195, 50.73824770380063], [7.1031761169433585, 50.73824770380063], [7.1031761169433585, 50.734268655851345] ]]).transform("EPSG:4326", e); case "Line": return new i([ [7.062578201293945, 50.721786104206004], [7.077512741088867, 50.729610159968296], [7.082319259643555, 50.732435192351126], [7.097940444946289, 50.73748722929948], [7.106866836547852, 50.73775882875318], [7.117509841918945, 50.73889952925885], [7.129182815551758, 50.7504679214779] ]).transform("EPSG:4326", e); default: return new o([7.10066, 50.735851]).transform("EPSG:4326", e); } }); }); export { u as default };