@florasync/leaflet-geokit 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +666 -59
- package/dist/django/index.js +9517 -0
- package/dist/django/index.js.map +1 -0
- package/dist/leaflet-geokit.es.js +2039 -1871
- package/dist/leaflet-geokit.es.js.map +1 -1
- package/dist/leaflet-geokit.external.es.js +2201 -0
- package/dist/leaflet-geokit.external.es.js.map +1 -0
- package/dist/leaflet-geokit.umd.js +36 -16
- package/dist/leaflet-geokit.umd.js.map +1 -1
- package/dist/preact/index-BM2U4rKn.js +2188 -0
- package/dist/preact/index-BM2U4rKn.js.map +1 -0
- package/dist/preact/index.js +109 -0
- package/dist/preact/index.js.map +1 -0
- package/dist/preact-bundled/index.js +9496 -0
- package/dist/preact-bundled/index.js.map +1 -0
- package/dist/react/index-BM2U4rKn.js +2188 -0
- package/dist/react/index-BM2U4rKn.js.map +1 -0
- package/dist/react/index.js +109 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react-bundled/index.js +9496 -0
- package/dist/react-bundled/index.js.map +1 -0
- package/dist/types/e2e/component.spec.d.ts +1 -0
- package/dist/types/e2e/dummy.spec.d.ts +1 -0
- package/dist/types/src/components/LeafletDrawMapElement.d.ts +94 -0
- package/dist/types/src/django/index.d.ts +35 -0
- package/dist/types/src/external.d.ts +4 -0
- package/dist/types/src/index.d.ts +4 -0
- package/dist/types/src/lib/FeatureStore.d.ts +48 -0
- package/dist/types/src/lib/MapController.d.ts +116 -0
- package/dist/types/src/lib/draw/L.Draw.Cake.d.ts +9 -0
- package/dist/types/src/lib/draw/toolbar-patch.d.ts +2 -0
- package/dist/types/src/lib/layer-cake/CakeBaker.d.ts +12 -0
- package/dist/types/src/lib/layer-cake/LayerCakeManager.d.ts +29 -0
- package/dist/types/src/lib/layer-cake/bindCakeControls.d.ts +8 -0
- package/dist/types/src/lib/layer-cake/ensureCircleEditable.d.ts +2 -0
- package/dist/types/src/lib/leaflet-assets.d.ts +23 -0
- package/dist/types/src/preact/core.d.ts +36 -0
- package/dist/types/src/preact/index.d.ts +8 -0
- package/dist/types/src/preact-bundled/index.d.ts +9 -0
- package/dist/types/src/react/core.d.ts +36 -0
- package/dist/types/src/react/index.d.ts +7 -0
- package/dist/types/src/react-bundled/index.d.ts +8 -0
- package/dist/types/src/shims/ensure-element.d.ts +2 -0
- package/dist/types/src/state/types.d.ts +7 -0
- package/dist/types/src/types/events.d.ts +71 -0
- package/dist/types/src/types/public.d.ts +106 -0
- package/dist/types/src/utils/geodesic.d.ts +8 -0
- package/dist/types/src/utils/geojson.d.ts +70 -0
- package/dist/types/src/utils/leaflet-guards.d.ts +9 -0
- package/dist/types/src/utils/logger.d.ts +12 -0
- package/dist/types/src/utils/ruler.d.ts +31 -0
- package/dist/types/tests/bbox-more.spec.d.ts +1 -0
- package/dist/types/tests/component-api-more.spec.d.ts +1 -0
- package/dist/types/tests/component-delegation.spec.d.ts +1 -0
- package/dist/types/tests/component-events.spec.d.ts +1 -0
- package/dist/types/tests/component-io.spec.d.ts +1 -0
- package/dist/types/tests/django-shim.spec.d.ts +1 -0
- package/dist/types/tests/draw-cake.spec.d.ts +1 -0
- package/dist/types/tests/eachcoord.spec.d.ts +1 -0
- package/dist/types/tests/element.spec.d.ts +1 -0
- package/dist/types/tests/featureStore-more.spec.d.ts +1 -0
- package/dist/types/tests/featureStore.spec.d.ts +1 -0
- package/dist/types/tests/framework-runtime-externalization.spec.d.ts +1 -0
- package/dist/types/tests/geodesic.spec.d.ts +1 -0
- package/dist/types/tests/geojson-merge.spec.d.ts +1 -0
- package/dist/types/tests/geojson-more.spec.d.ts +1 -0
- package/dist/types/tests/geojson.spec.d.ts +1 -0
- package/dist/types/tests/layer-cake-baker.spec.d.ts +1 -0
- package/dist/types/tests/layer-cake-controls.spec.d.ts +1 -0
- package/dist/types/tests/layer-cake-editing.spec.d.ts +1 -0
- package/dist/types/tests/layer-cake-manager.spec.d.ts +1 -0
- package/dist/types/tests/leaflet-assets.spec.d.ts +1 -0
- package/dist/types/tests/leaflet-draw-circle-resize-patch.spec.d.ts +1 -0
- package/dist/types/tests/logger-more.spec.d.ts +1 -0
- package/dist/types/tests/logger.spec.d.ts +1 -0
- package/dist/types/tests/map-controller.spec.d.ts +1 -0
- package/dist/types/tests/mapcontroller-merge.spec.d.ts +1 -0
- package/dist/types/tests/preact-bundled-shim.spec.d.ts +1 -0
- package/dist/types/tests/react-bundled-shim.spec.d.ts +1 -0
- package/dist/types/tests/react-shim.spec.d.ts +1 -0
- package/dist/types/tests/ruler.spec.d.ts +1 -0
- package/dist/types/vite.config.d.ts +2 -0
- package/dist/types/vite.config.external.d.ts +2 -0
- package/dist/types/vite.config.preact-bundled.d.ts +2 -0
- package/dist/types/vite.config.preact.d.ts +2 -0
- package/dist/types/vite.config.react-bundled.d.ts +2 -0
- package/dist/types/vite.config.react.d.ts +2 -0
- package/package.json +61 -5
|
@@ -0,0 +1,2188 @@
|
|
|
1
|
+
var ue = Object.defineProperty;
|
|
2
|
+
var fe = (i, t, e) => t in i ? ue(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var u = (i, t, e) => fe(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import * as C from "leaflet";
|
|
5
|
+
import "leaflet-draw";
|
|
6
|
+
import "leaflet-ruler";
|
|
7
|
+
const K = {
|
|
8
|
+
trace: 10,
|
|
9
|
+
debug: 20,
|
|
10
|
+
info: 30,
|
|
11
|
+
warn: 40,
|
|
12
|
+
error: 50
|
|
13
|
+
};
|
|
14
|
+
function he(i, t) {
|
|
15
|
+
return i === "silent" ? !1 : K[t] >= K[i];
|
|
16
|
+
}
|
|
17
|
+
function ge() {
|
|
18
|
+
try {
|
|
19
|
+
return (/* @__PURE__ */ new Date()).toISOString();
|
|
20
|
+
} catch {
|
|
21
|
+
return "";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function N(i, t = "debug", e = console) {
|
|
25
|
+
let o = t;
|
|
26
|
+
const a = (n) => (...l) => {
|
|
27
|
+
try {
|
|
28
|
+
if (!he(o, n)) return;
|
|
29
|
+
const s = `[${ge()}][${i}][${n.toUpperCase()}]`, c = e[n];
|
|
30
|
+
typeof c == "function" ? c(s, ...l) : e.log(s, ...l);
|
|
31
|
+
} catch {
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
get level() {
|
|
36
|
+
return o;
|
|
37
|
+
},
|
|
38
|
+
setLevel(n) {
|
|
39
|
+
o = n;
|
|
40
|
+
},
|
|
41
|
+
trace: a("trace"),
|
|
42
|
+
debug: a("debug"),
|
|
43
|
+
info: a("info"),
|
|
44
|
+
warn: a("warn"),
|
|
45
|
+
error: a("error"),
|
|
46
|
+
child(n) {
|
|
47
|
+
return N(`${i}:${n}`, o, e);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const me = '.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T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flet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}', Ae = `.leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAAeCAYAAACWuCNnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAG7AAABuwBHnU4NQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbvSURBVHic7dtdbBxXFQfw/9nZ3SRKwAP7UFFUQOoHqGnUoEAoNghX9tyxVcpD1X0J+WgiUQmpfUB5ACSgG1qJIKASqBIUIauqAbWseIlqb+bOWHVR6y0FKZBEqdIUQROIREGRx3FFvR/38ODZst3a3nE8Ywfv+T2t7hzdM3fle/bOnWtACCGEEEIIIYQQQgghhBBCCCGEEEIIIcRa0EbfgBDdFItFKwzDAa3175LuWylVAvBIR/MxrXUp6Vxx9dp4VyObVEdKKW591lonXgiVUg6AHzPzk9ls9meVSmUh6RzXkz179uQKhcIgM+8CACI6U6vVnp+enm6knXt4ePiuTCbzWQAwxlSDIHg57ZwroDAMnwKwz3XdBzzPG08hxzsTNprQG2lTjtd13WFmfghAP4A+AJcATFiW9YNKpfL3uP0kUliiX4SG1pqUUpx0wXJd9/PMXAGwPWq6yMyPz8/P/7xarf4nyVwt7QV4JWkU52i8YwBu6bh0wRhzJAiCF5POCQCDg4N2Pp//NYDRjkuTxph9QRCESeYrFov5ubm5R5n5AIAPtV1aYOb7BgYGTpZKJeO67lFmPsbM9/i+/8Ja8y6zylhOYquPXhsvAJRKpczMzMwTAIaJ6LFGo+HNzs5eKRQKNxPRAWb+CoAjWuvn4vS35skWFasxAAdbbUlOYqVUPwAPwI4lLr8J4KeWZT1eqVTmksoZ5d2QghUVKx/AlmVCFph5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BQBH0vj+Pc+bYOb3HFRk5nHf9yeTzgfgMhF9uEvMTQD+71/vR3pqvJOTk28AeBJAeXR09P1LxbiuuxfA9wB8LU6fsVdYrUOhtm0fTusxcAlMRN+KziUt5SqAM3v37r00OZnGfFp/QRC86DjOUCaTGWPm2zoun8fiIbuZtPLX6/UH8/n8rQDuippertfrD6aRKyqOR5VS81ji8Z+IbmfmgwB+mEb+9dZr4wWA/v7+R6rV6k+azeYpx3EezeVyJ7dv335lfn7+lkajcZCZDzPzYd/3/xSnv9gFq3UuaR2LFQDA87xAKVUB8BEAZ6N9nrNEdEZr/TcArLVOPG8aJ9jj8n3/pcHBwZ1btmx5519zmPl0vV5/Ie2V7fT09Nujo6Nus9kcA4CtW7ce1lq/nUYu27a/Mzs7CyI6gMVX/u/CzJeZ+Ue2bcc9pb1aXc8lJZms18YLANE2wkOu694N4OFGo3E8DMMPAHiDiCaY+ZOb4YCsEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhEjYfwGO+b5dFNs4OgAAAABJRU5ErkJggg==);background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAA8CAYAAAC6nMS5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ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jbGyZHUFjzP2yginwcAVX1fVi99Vo2OjnaeP3/+3SLydgBvBNBd56GXAHxXVR/s7e3dm9YJOg0rqQNm+y5dFtp3HmKM2QxgF8qr9b8GwA0AzgH4MYBjIjJ28eLFkFeOiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIhWgv8Hnffz4dmwY9cAAAAASUVORK5CYII=);background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e")}.leaflet-draw a{display:block;text-align:center;text-decoration:none}.leaflet-draw a .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #AAA;color:#fff;font:11px/19px Helvetica Neue,Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:#00000080;border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px Helvetica Neue,Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}.leaflet-draw-tooltip:before{border-right:6px solid black;border-right-color:#00000080;border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}.leaflet-edit-marker-selected{background-color:#fe57a11a;border:4px dashed rgba(254,87,161,.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}`, be = ".leaflet-ruler{height:35px;width:35px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhBQoMHg6McuYvAAABwklEQVQ4y43TP0jUYRgH8M/daQpqdujhnwShGiwyipCIoIgWxyIwrqEhnCQoGqKhpoYMg1qCQjg8TC2JCtSkjCgaKisIhyQUwpJssD9KZWRZg6d450/yGV54n/fzfd53eUOCaoNa5QpNGNPr9cKjUAatdsB++co0G1XiiHd+uqnTq8VzI874o9s2Ic1iiEpii9tmnJOdfkOldt/dU+HYolHnjdmpRNzbuVaNL86m4sXqNOrz3kMXHFKYMqd8VREGBToMifqLgwY1yNZirya5knaBqH16fJjNJiWEFSlxy4g980+pMuZkir/UJjLbrvNRPnINaLUygK/yQpuImHp47LOjuKJPOJA/1y4iZsAlyozLs8IO42L/4QlhGrSCy5oCeKH+dM59vVbL9sn6AP5MRzpnVKtN1viRxit1WRvEmVKFrQbTpoddNR3E+aYKuw1lPOapa0GcEf22KzOtejmcG1rkYdjEAn59KU5cDzjt+HI4BSZtVJTazfIsMQOmFAusLr/E53lniickJYIDNcaUL+JhMZPWBUdOeCCaweGOw5k0lFrv2uyRuBxPlLpoBtTK0p3mh+f+dKl6jX6LapRj6XrzD+1bmkFA/dTVAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA1LTEwVDEyOjMwOjE0KzAyOjAwUNH5TAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNS0xMFQxMjozMDoxNCswMjowMCGMQfAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center}.leaflet-ruler:hover{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMd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PlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=)}.leaflet-ruler-clicked{height:35px;width:35px;background-repeat:no-repeat;background-position:center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXU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CYII=);border-color:#7fff00!important}.leaflet-bar{background-color:#fff}.leaflet-control{cursor:pointer}.result-tooltip{background-color:#fff;border-width:medium;border-color:#de0000;font-size:smaller}.moving-tooltip{background-color:#ffffffb3;background-clip:padding-box;opacity:.5;border:dotted;border-color:red;font-size:smaller}.plus-length{padding-left:45px}", ye = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2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AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC", ke = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='430'%20height='430'%20style='width:100%25;height:100%25;transform:translate3d(0,0,0);content-visibility:visible'%20viewBox='0%200%20430%20430'%3e%3cdefs%3e%3cclipPath%20id='i'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='s'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='e'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='p'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='f'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='m'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='g'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='j'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='h'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cfilter%20id='t'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cfilter%20id='r'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'%20stdDeviation='52.5%2052.5'/%3e%3c/filter%3e%3cfilter%20id='n'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cfilter%20id='k'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cmask%20id='u'%20mask-type='alpha'%3e%3cuse%20xmlns:ns1='http://www.w3.org/1999/xlink'%20ns1:href='%23a'/%3e%3c/mask%3e%3cmask%20id='q'%20mask-type='alpha'%3e%3cuse%20xmlns:ns2='http://www.w3.org/1999/xlink'%20ns2:href='%23b'/%3e%3c/mask%3e%3cmask%20id='o'%20mask-type='alpha'%3e%3cuse%20xmlns:ns3='http://www.w3.org/1999/xlink'%20ns3:href='%23c'/%3e%3c/mask%3e%3cmask%20id='l'%20mask-type='alpha'%3e%3cuse%20xmlns:ns4='http://www.w3.org/1999/xlink'%20ns4:href='%23d'/%3e%3c/mask%3e%3cg%20id='a'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23e)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3cg%20id='b'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='12'%20clip-path='url(%23f)'%20style='display:block'%3e%3cpath%20stroke='%2308A88A'%20d='M44.446-66.518a79.998%2079.998%200%200%200-101.012%209.952A79.998%2079.998%200%201%200%2056.569%2056.569%2080.005%2080.005%200%200%200%2073.91-30.615a80.001%2080.001%200%200%200-29.464-35.903z'%20class='secondary'%20style='display:block'%20transform='translate(215%20214)'/%3e%3cpath%20stroke='%23121331'%20d='m141.409%2025.241%208.727%205.041s0%200%200%200a22.3%2022.3%200%200%201%2010.411%2013.542%2022.32%2022.32%200%200%201-2.221%2016.937l-26.515%2045.924a22.325%2022.325%200%200%201-30.497%208.172l-8.754-5.059a143.414%20143.414%200%200%201-43.718%2025.286v10.108a22.302%2022.302%200%200%201-13.778%2020.612%2022.303%2022.303%200%200%201-8.539%201.696h-53.029a22.303%2022.303%200%200%201-15.779-6.531%2022.302%2022.302%200%200%201-6.537-15.777v-10.073a143.416%20143.416%200%200%201-43.719-25.285l-8.754%205.059a22.325%2022.325%200%200%201-30.497-8.172l-26.523-45.924a22.315%2022.315%200%200%201-2.238-16.943A22.31%2022.31%200%200%201-150.142%2030.3l8.727-5.041a145.097%20145.097%200%200%201%200-50.518l-8.727-5.041a22.294%2022.294%200%200%201-10.409-13.554%2022.306%2022.306%200%200%201%202.238-16.943l26.514-45.924a22.325%2022.325%200%200%201%2030.497-8.172l8.754%205.059a143.416%20143.416%200%200%201%2043.719-25.285v-10.073a22.302%2022.302%200%200%201%206.537-15.777%2022.3%2022.3%200%200%201%2015.779-6.531h53.02a22.307%2022.307%200%200%201%2022.317%2022.308v10.037a143.41%20143.41%200%200%201%2043.718%2025.285l8.754-5.059a22.325%2022.325%200%200%201%2030.497%208.172l26.515%2045.942a22.313%2022.313%200%200%201-1.618%2024.757%2022.294%2022.294%200%200%201-6.554%205.74l-8.727%205.041a145.097%20145.097%200%200%201%200%2050.518z'%20class='primary'%20style='display:block'%20transform='rotate(-120%20169.576%2045.095)'/%3e%3c/g%3e%3cg%20id='c'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23g)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3cg%20id='d'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23h)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3c/defs%3e%3cg%20clip-path='url(%23i)'%3e%3cg%20clip-path='url(%23j)'%20filter='url(%23k)'%20mask='url(%23l)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23m)'%20filter='url(%23n)'%20mask='url(%23o)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23p)'%20mask='url(%23q)'%20style='display:block'%3e%3cg%20filter='url(%23r)'%20transform='rotate(-94%20238.762%20-16.565)%20scale(2.4)'%3e%3cg%20class='design'%3e%3cpath%20fill='%234BE1EC'%20d='M0-250c137.975%200%20250%20112.025%20250%20250S137.975%20250%200%20250-250%20137.975-250%200-137.975-250%200-250z'%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20fill='%23CB5EEE'%20d='M113.242-295.384c97.478%200%20176.5%2079.022%20176.5%20176.5s-79.022%20176.5-176.5%20176.5c-43.948%200-74.396-34.057-105.29-60.631-37.631-32.369-71.21-62.338-71.21-115.869%200-97.478%2079.022-176.5%20176.5-176.5z'%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23s)'%20filter='url(%23t)'%20mask='url(%23u)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", re = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%20-1.67%2047.336%2047.336'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group_42'%20data-name='Group%2042'%20transform='translate(-172.455%20-364.36)'%3e%3cpath%20id='Rectangle_17'%20data-name='Rectangle%2017'%20d='M4.351,0H40.984a4.351,4.351,0,0,1,4.351,4.351V22.117a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z'%20transform='translate(173.455%20384.243)'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cpath%20id='Path_90'%20data-name='Path%2090'%20d='M218.79,390.249a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.778,3.778,0,0,1-3.777-3.778'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cg%20id='Group_41'%20data-name='Group%2041'%3e%3cpath%20id='Rectangle_18'%20data-name='Rectangle%2018'%20d='M4.351,0H26.473a4.351,4.351,0,0,1,4.351,4.351V17.883a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z'%20transform='translate(180.71%20365.36)'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cpath%20id='Path_91'%20data-name='Path%2091'%20d='M211.234,370.794a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", ve = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhBQoMHg6McuYvAAABwklEQVQ4y43TP0jUYRgH8M/daQpqdujhnwShGiwyipCIoIgWxyIwrqEhnCQoGqKhpoYMg1qCQjg8TC2JCtSkjCgaKisIhyQUwpJssD9KZWRZg6d450/yGV54n/fzfd53eUOCaoNa5QpNGNPr9cKjUAatdsB++co0G1XiiHd+uqnTq8VzI874o9s2Ic1iiEpii9tmnJOdfkOldt/dU+HYolHnjdmpRNzbuVaNL86m4sXqNOrz3kMXHFKYMqd8VREGBToMifqLgwY1yNZirya5knaBqH16fJjNJiWEFSlxy4g980+pMuZkir/UJjLbrvNRPnINaLUygK/yQpuImHp47LOjuKJPOJA/1y4iZsAlyozLs8IO42L/4QlhGrSCy5oCeKH+dM59vVbL9sn6AP5MRzpnVKtN1viRxit1WRvEmVKFrQbTpoddNR3E+aYKuw1lPOapa0GcEf22KzOtejmcG1rkYdjEAn59KU5cDzjt+HI4BSZtVJTazfIsMQOmFAusLr/E53lniickJYIDNcaUL+JhMZPWBUdOeCCaweGOw5k0lFrv2uyRuBxPlLpoBtTK0p3mh+f+dKl6jX6LapRj6XrzD+1bmkFA/dTVAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA1LTEwVDEyOjMwOjE0KzAyOjAwUNH5TAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNS0xMFQxMjozMDoxNCswMjowMCGMQfAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC", Ee = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkL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GzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=";
|
|
52
|
+
function Me(i) {
|
|
53
|
+
const t = "data-leaflet-styles";
|
|
54
|
+
if (i.querySelector(`style[${t}]`)) return;
|
|
55
|
+
const e = document.createElement("style");
|
|
56
|
+
e.setAttribute(t, "true"), e.textContent = `
|
|
57
|
+
/* --- Leaflet core CSS --- */
|
|
58
|
+
${me}
|
|
59
|
+
|
|
60
|
+
/* --- Leaflet.draw CSS --- */
|
|
61
|
+
${Ae}
|
|
62
|
+
|
|
63
|
+
/* --- Leaflet.ruler CSS --- */
|
|
64
|
+
${be}
|
|
65
|
+
|
|
66
|
+
/* --- Fix Leaflet.ruler icons (broken relative paths in inlined CSS) --- */
|
|
67
|
+
.leaflet-ruler {
|
|
68
|
+
width: 30px !important; /* Match Leaflet Draw default size approx */
|
|
69
|
+
height: 30px !important;
|
|
70
|
+
background-color: #fff; /* Ensure visibility */
|
|
71
|
+
background-image: url(${ve}) !important;
|
|
72
|
+
background-size: 16px 16px; /* Scale icon to fit */
|
|
73
|
+
}
|
|
74
|
+
.leaflet-ruler:hover,
|
|
75
|
+
.leaflet-ruler-clicked {
|
|
76
|
+
background-image: url(${Ee}) !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* --- Custom overrides for marker/handle sizes --- */
|
|
80
|
+
.leaflet-draw-handle,
|
|
81
|
+
.leaflet-editing-icon,
|
|
82
|
+
.leaflet-draw-marker-icon {
|
|
83
|
+
width: 12px !important;
|
|
84
|
+
height: 12px !important;
|
|
85
|
+
margin-left: -6px !important;
|
|
86
|
+
margin-top: -6px !important;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* --- Ruler settings control --- */
|
|
90
|
+
.leaflet-ruler-settings-control {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
}
|
|
94
|
+
.leaflet-ruler-settings-button {
|
|
95
|
+
width: 30px;
|
|
96
|
+
height: 30px;
|
|
97
|
+
border: none;
|
|
98
|
+
background-color: #fff;
|
|
99
|
+
background-repeat: no-repeat;
|
|
100
|
+
background-position: center;
|
|
101
|
+
background-size: 22px 22px;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
padding: 0;
|
|
104
|
+
border-radius: 4px;
|
|
105
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
|
|
106
|
+
background-image: url(${ke});
|
|
107
|
+
transition: background-color 0.15s ease, box-shadow 0.15s ease;
|
|
108
|
+
}
|
|
109
|
+
.leaflet-ruler-settings-button:hover {
|
|
110
|
+
background-color: #f4f4f4;
|
|
111
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
|
112
|
+
}
|
|
113
|
+
.leaflet-ruler-settings-button:focus-visible {
|
|
114
|
+
outline: 2px solid #2c7be5;
|
|
115
|
+
outline-offset: 2px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* --- Measurement modal --- */
|
|
119
|
+
.leaflet-ruler-modal-overlay {
|
|
120
|
+
position: absolute;
|
|
121
|
+
inset: 0;
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
background: rgba(0, 0, 0, 0.4);
|
|
126
|
+
z-index: 500;
|
|
127
|
+
opacity: 0;
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
transition: opacity 0.2s ease;
|
|
130
|
+
padding: 16px;
|
|
131
|
+
}
|
|
132
|
+
.leaflet-ruler-modal-overlay.is-open {
|
|
133
|
+
opacity: 1;
|
|
134
|
+
pointer-events: auto;
|
|
135
|
+
}
|
|
136
|
+
.leaflet-ruler-modal {
|
|
137
|
+
background: #fff;
|
|
138
|
+
border-radius: 8px;
|
|
139
|
+
width: min(320px, 100%);
|
|
140
|
+
padding: 16px;
|
|
141
|
+
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
|
|
142
|
+
}
|
|
143
|
+
.leaflet-ruler-modal-title {
|
|
144
|
+
margin: 0 0 8px;
|
|
145
|
+
font-size: 16px;
|
|
146
|
+
font-weight: 600;
|
|
147
|
+
}
|
|
148
|
+
.leaflet-ruler-modal-description {
|
|
149
|
+
margin: 0 0 12px;
|
|
150
|
+
font-size: 13px;
|
|
151
|
+
color: #444;
|
|
152
|
+
}
|
|
153
|
+
.leaflet-ruler-modal-options {
|
|
154
|
+
display: flex;
|
|
155
|
+
flex-direction: column;
|
|
156
|
+
gap: 8px;
|
|
157
|
+
}
|
|
158
|
+
.leaflet-ruler-modal-option {
|
|
159
|
+
display: flex;
|
|
160
|
+
gap: 8px;
|
|
161
|
+
align-items: flex-start;
|
|
162
|
+
font-size: 14px;
|
|
163
|
+
}
|
|
164
|
+
.leaflet-ruler-modal-option input[type="radio"] {
|
|
165
|
+
margin-top: 4px;
|
|
166
|
+
}
|
|
167
|
+
.leaflet-ruler-modal-option span {
|
|
168
|
+
line-height: 1.25;
|
|
169
|
+
}
|
|
170
|
+
.leaflet-ruler-modal-actions {
|
|
171
|
+
margin-top: 16px;
|
|
172
|
+
display: flex;
|
|
173
|
+
justify-content: flex-end;
|
|
174
|
+
}
|
|
175
|
+
.leaflet-ruler-modal-close {
|
|
176
|
+
border: none;
|
|
177
|
+
background: #2c7be5;
|
|
178
|
+
color: #fff;
|
|
179
|
+
border-radius: 4px;
|
|
180
|
+
padding: 6px 12px;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
font-size: 14px;
|
|
183
|
+
}
|
|
184
|
+
.leaflet-ruler-modal-close:hover {
|
|
185
|
+
background: #1a56c2;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* --- Layer Cake draw tool icon + manager UI --- */
|
|
189
|
+
.leaflet-draw-toolbar a.leaflet-draw-draw-cake {
|
|
190
|
+
background-image: url(${re}) !important;
|
|
191
|
+
background-size: 18px 18px !important;
|
|
192
|
+
background-position: 50% 50% !important;
|
|
193
|
+
background-repeat: no-repeat !important;
|
|
194
|
+
background-color: #fff;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.layer-cake-controls__container {
|
|
198
|
+
display: flex;
|
|
199
|
+
gap: 6px;
|
|
200
|
+
background: white;
|
|
201
|
+
padding: 5px;
|
|
202
|
+
border-radius: 4px;
|
|
203
|
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.layer-cake-controls button {
|
|
207
|
+
border: 1px solid #ccc;
|
|
208
|
+
background: white;
|
|
209
|
+
padding: 4px 8px;
|
|
210
|
+
border-radius: 3px;
|
|
211
|
+
font-size: 12px;
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.layer-cake-controls button:hover {
|
|
216
|
+
background: #f4f4f4;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* --- Layer Cake measurement tooltips --- */
|
|
220
|
+
.cake-label {
|
|
221
|
+
background-color: rgba(255, 255, 255, 0.95) !important;
|
|
222
|
+
border: 2px solid #8A2BE2 !important;
|
|
223
|
+
border-radius: 4px !important;
|
|
224
|
+
color: #333 !important;
|
|
225
|
+
font-size: 13px !important;
|
|
226
|
+
font-weight: 600 !important;
|
|
227
|
+
padding: 4px 8px !important;
|
|
228
|
+
white-space: nowrap !important;
|
|
229
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.cake-label::before {
|
|
233
|
+
border-right-color: #8A2BE2 !important;
|
|
234
|
+
}
|
|
235
|
+
`, i.appendChild(e);
|
|
236
|
+
}
|
|
237
|
+
function Ce(i) {
|
|
238
|
+
const t = "data-leaflet-custom-styles";
|
|
239
|
+
if (i.querySelector(`style[${t}]`)) return;
|
|
240
|
+
const e = document.createElement("style");
|
|
241
|
+
e.setAttribute(t, "true"), e.textContent = `
|
|
242
|
+
/* Ensure Layer Cake toolbar icon uses project asset instead of draw sprite sheet */
|
|
243
|
+
.leaflet-draw-toolbar a.leaflet-draw-draw-cake {
|
|
244
|
+
background-image: url(${re}) !important;
|
|
245
|
+
background-size: 18px 18px !important;
|
|
246
|
+
background-position: 50% 50% !important;
|
|
247
|
+
background-repeat: no-repeat !important;
|
|
248
|
+
background-color: #fff;
|
|
249
|
+
}
|
|
250
|
+
`, i.appendChild(e);
|
|
251
|
+
}
|
|
252
|
+
function Be() {
|
|
253
|
+
var i, t;
|
|
254
|
+
(t = (i = C.Icon.Default).mergeOptions) == null || t.call(i, {
|
|
255
|
+
iconRetinaUrl: ye,
|
|
256
|
+
iconUrl: xe,
|
|
257
|
+
shadowUrl: we
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
function Ie(i) {
|
|
261
|
+
const { root: t, skipStyles: e } = i;
|
|
262
|
+
try {
|
|
263
|
+
e || (Me(t), Be()), Ce(t);
|
|
264
|
+
} catch {
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
let O;
|
|
268
|
+
const Le = new Uint8Array(16);
|
|
269
|
+
function ze() {
|
|
270
|
+
if (!O && (O = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !O))
|
|
271
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
272
|
+
return O(Le);
|
|
273
|
+
}
|
|
274
|
+
const M = [];
|
|
275
|
+
for (let i = 0; i < 256; ++i)
|
|
276
|
+
M.push((i + 256).toString(16).slice(1));
|
|
277
|
+
function Re(i, t = 0) {
|
|
278
|
+
return M[i[t + 0]] + M[i[t + 1]] + M[i[t + 2]] + M[i[t + 3]] + "-" + M[i[t + 4]] + M[i[t + 5]] + "-" + M[i[t + 6]] + M[i[t + 7]] + "-" + M[i[t + 8]] + M[i[t + 9]] + "-" + M[i[t + 10]] + M[i[t + 11]] + M[i[t + 12]] + M[i[t + 13]] + M[i[t + 14]] + M[i[t + 15]];
|
|
279
|
+
}
|
|
280
|
+
const Se = typeof crypto != "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto), X = {
|
|
281
|
+
randomUUID: Se
|
|
282
|
+
};
|
|
283
|
+
function q(i, t, e) {
|
|
284
|
+
if (X.randomUUID && !i)
|
|
285
|
+
return X.randomUUID();
|
|
286
|
+
i = i || {};
|
|
287
|
+
const o = i.random || (i.rng || ze)();
|
|
288
|
+
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, Re(o);
|
|
289
|
+
}
|
|
290
|
+
function Ue(i) {
|
|
291
|
+
var e, o;
|
|
292
|
+
const t = (o = i.id) != null ? o : (e = i.properties) == null ? void 0 : e.id;
|
|
293
|
+
if (t != null)
|
|
294
|
+
return String(t);
|
|
295
|
+
}
|
|
296
|
+
function Oe(i, t) {
|
|
297
|
+
const e = (o) => {
|
|
298
|
+
switch (o.type) {
|
|
299
|
+
case "Point":
|
|
300
|
+
t(o.coordinates);
|
|
301
|
+
break;
|
|
302
|
+
case "MultiPoint":
|
|
303
|
+
case "LineString":
|
|
304
|
+
for (const a of o.coordinates) t(a);
|
|
305
|
+
break;
|
|
306
|
+
case "MultiLineString":
|
|
307
|
+
case "Polygon":
|
|
308
|
+
for (const a of o.coordinates)
|
|
309
|
+
for (const r of a) t(r);
|
|
310
|
+
break;
|
|
311
|
+
case "MultiPolygon":
|
|
312
|
+
for (const a of o.coordinates)
|
|
313
|
+
for (const r of a)
|
|
314
|
+
for (const n of r) t(n);
|
|
315
|
+
break;
|
|
316
|
+
case "GeometryCollection":
|
|
317
|
+
for (const a of o.geometries) e(a);
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
e(i);
|
|
322
|
+
}
|
|
323
|
+
function De(i) {
|
|
324
|
+
const t = i.geometry;
|
|
325
|
+
if (!t) return null;
|
|
326
|
+
let e = 1 / 0, o = 1 / 0, a = -1 / 0, r = -1 / 0, n = !1;
|
|
327
|
+
return Oe(t, (l) => {
|
|
328
|
+
const [s, c] = l;
|
|
329
|
+
typeof s != "number" || typeof c != "number" || (n = !0, s < e && (e = s), c < o && (o = c), s > a && (a = s), c > r && (r = c));
|
|
330
|
+
}), n ? [e, o, a, r] : null;
|
|
331
|
+
}
|
|
332
|
+
function Pe(i) {
|
|
333
|
+
let t = 1 / 0, e = 1 / 0, o = -1 / 0, a = -1 / 0, r = !1;
|
|
334
|
+
for (const n of i.features) {
|
|
335
|
+
const l = De(n);
|
|
336
|
+
l && (r = !0, t = Math.min(t, l[0]), e = Math.min(e, l[1]), o = Math.max(o, l[2]), a = Math.max(a, l[3]));
|
|
337
|
+
}
|
|
338
|
+
return r ? [t, e, o, a] : null;
|
|
339
|
+
}
|
|
340
|
+
function Te(i) {
|
|
341
|
+
const [t, e, o, a] = i;
|
|
342
|
+
return [
|
|
343
|
+
[e, t],
|
|
344
|
+
[a, o]
|
|
345
|
+
];
|
|
346
|
+
}
|
|
347
|
+
function W(i) {
|
|
348
|
+
var e;
|
|
349
|
+
const t = [];
|
|
350
|
+
for (const o of i.features) {
|
|
351
|
+
if (!o || o.type !== "Feature") continue;
|
|
352
|
+
const a = (e = o.properties) != null ? e : {}, r = o.geometry;
|
|
353
|
+
if (r)
|
|
354
|
+
switch (r.type) {
|
|
355
|
+
case "MultiPolygon":
|
|
356
|
+
for (const n of r.coordinates)
|
|
357
|
+
t.push({
|
|
358
|
+
type: "Feature",
|
|
359
|
+
properties: { ...a },
|
|
360
|
+
geometry: { type: "Polygon", coordinates: n }
|
|
361
|
+
});
|
|
362
|
+
break;
|
|
363
|
+
case "MultiLineString":
|
|
364
|
+
for (const n of r.coordinates)
|
|
365
|
+
t.push({
|
|
366
|
+
type: "Feature",
|
|
367
|
+
properties: { ...a },
|
|
368
|
+
geometry: { type: "LineString", coordinates: n }
|
|
369
|
+
});
|
|
370
|
+
break;
|
|
371
|
+
case "MultiPoint":
|
|
372
|
+
for (const n of r.coordinates)
|
|
373
|
+
t.push({
|
|
374
|
+
type: "Feature",
|
|
375
|
+
properties: { ...a },
|
|
376
|
+
geometry: { type: "Point", coordinates: n }
|
|
377
|
+
});
|
|
378
|
+
break;
|
|
379
|
+
case "GeometryCollection":
|
|
380
|
+
for (const n of r.geometries)
|
|
381
|
+
t.push({
|
|
382
|
+
type: "Feature",
|
|
383
|
+
properties: { ...a },
|
|
384
|
+
geometry: n
|
|
385
|
+
});
|
|
386
|
+
break;
|
|
387
|
+
default:
|
|
388
|
+
t.push(o);
|
|
389
|
+
break;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
return { type: "FeatureCollection", features: t };
|
|
393
|
+
}
|
|
394
|
+
function ne(i) {
|
|
395
|
+
return (i == null ? void 0 : i.type) === "Polygon";
|
|
396
|
+
}
|
|
397
|
+
function ie(i) {
|
|
398
|
+
return (i == null ? void 0 : i.type) === "MultiPolygon";
|
|
399
|
+
}
|
|
400
|
+
function Ne(i) {
|
|
401
|
+
const t = i.geometry;
|
|
402
|
+
return t ? ne(t) ? [t.coordinates] : ie(t) ? t.coordinates : [] : [];
|
|
403
|
+
}
|
|
404
|
+
function Ve(i, t) {
|
|
405
|
+
var a, r;
|
|
406
|
+
const e = [];
|
|
407
|
+
for (const n of i) {
|
|
408
|
+
const l = Ne(n);
|
|
409
|
+
l.length > 0 && e.push(...l);
|
|
410
|
+
}
|
|
411
|
+
if (e.length === 0) return null;
|
|
412
|
+
const o = (r = t != null ? t : (a = i[0]) == null ? void 0 : a.properties) != null ? r : {};
|
|
413
|
+
return e.length === 1 ? {
|
|
414
|
+
type: "Feature",
|
|
415
|
+
properties: { ...o },
|
|
416
|
+
geometry: {
|
|
417
|
+
type: "Polygon",
|
|
418
|
+
coordinates: e[0]
|
|
419
|
+
}
|
|
420
|
+
} : {
|
|
421
|
+
type: "Feature",
|
|
422
|
+
properties: { ...o },
|
|
423
|
+
geometry: {
|
|
424
|
+
type: "MultiPolygon",
|
|
425
|
+
coordinates: e
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
class Fe {
|
|
430
|
+
constructor(t = N("feature-store", "debug")) {
|
|
431
|
+
u(this, "log");
|
|
432
|
+
u(this, "features");
|
|
433
|
+
this.log = t, this.features = /* @__PURE__ */ new Map();
|
|
434
|
+
}
|
|
435
|
+
size() {
|
|
436
|
+
return this.features.size;
|
|
437
|
+
}
|
|
438
|
+
has(t) {
|
|
439
|
+
return this.features.has(t);
|
|
440
|
+
}
|
|
441
|
+
get(t) {
|
|
442
|
+
return this.features.get(t);
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Add features to the store; returns the assigned/normalized ids in order.
|
|
446
|
+
*/
|
|
447
|
+
add(t) {
|
|
448
|
+
var r, n, l, s;
|
|
449
|
+
const e = [], o = (n = (r = performance.now) == null ? void 0 : r.call(performance)) != null ? n : Date.now();
|
|
450
|
+
for (const c of t.features) {
|
|
451
|
+
const d = this.ensureId(c), p = { ...c, id: d };
|
|
452
|
+
this.features.set(d, p), e.push(d);
|
|
453
|
+
}
|
|
454
|
+
const a = ((s = (l = performance.now) == null ? void 0 : l.call(performance)) != null ? s : Date.now()) - o;
|
|
455
|
+
return this.log.debug("add", {
|
|
456
|
+
count: t.features.length,
|
|
457
|
+
ids: e,
|
|
458
|
+
elapsedMs: Math.round(a)
|
|
459
|
+
}), e;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Update a feature by id. If the feature does not exist, this is a no-op.
|
|
463
|
+
* The provided feature will overwrite the stored one with the given id.
|
|
464
|
+
*/
|
|
465
|
+
update(t, e) {
|
|
466
|
+
if (!this.features.has(t)) {
|
|
467
|
+
this.log.warn("update:missing", { id: t });
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
const o = { ...e, id: t };
|
|
471
|
+
this.features.set(t, o), this.log.debug("update", { id: t });
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Remove a feature by id. No-op if missing.
|
|
475
|
+
*/
|
|
476
|
+
remove(t) {
|
|
477
|
+
this.features.delete(t) ? this.log.debug("remove", { id: t }) : this.log.warn("remove:missing", { id: t });
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Clear all features.
|
|
481
|
+
*/
|
|
482
|
+
clear() {
|
|
483
|
+
const t = this.features.size;
|
|
484
|
+
this.features.clear(), this.log.debug("clear", { count: t });
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Export snapshot as FeatureCollection.
|
|
488
|
+
*/
|
|
489
|
+
toFeatureCollection() {
|
|
490
|
+
return {
|
|
491
|
+
type: "FeatureCollection",
|
|
492
|
+
features: Array.from(this.features.values())
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Compute bounds for current data as [[south, west], [north, east]] or null if empty.
|
|
497
|
+
*/
|
|
498
|
+
bounds() {
|
|
499
|
+
const t = this.toFeatureCollection();
|
|
500
|
+
if (t.features.length === 0) return null;
|
|
501
|
+
const e = Pe(t);
|
|
502
|
+
return e ? Te(e) : null;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Ensure the feature has an id; returns the resolved id.
|
|
506
|
+
*/
|
|
507
|
+
ensureId(t) {
|
|
508
|
+
const e = Ue(t);
|
|
509
|
+
if (e) return String(e);
|
|
510
|
+
const o = q();
|
|
511
|
+
return t.id = o, t.properties && typeof t.properties == "object" && (t.properties.id = o), o;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
const _ = /* @__PURE__ */ new WeakSet();
|
|
515
|
+
function He(i = C) {
|
|
516
|
+
var o;
|
|
517
|
+
if (_.has(i)) return;
|
|
518
|
+
const t = i.DrawToolbar;
|
|
519
|
+
if (!((o = t == null ? void 0 : t.prototype) != null && o.getModeHandlers)) return;
|
|
520
|
+
const e = t.prototype.getModeHandlers;
|
|
521
|
+
t.prototype.getModeHandlers = function(a) {
|
|
522
|
+
var n, l;
|
|
523
|
+
const r = e.call(this, a);
|
|
524
|
+
if ((n = this.options) != null && n.cake) {
|
|
525
|
+
const s = (l = i.Draw) == null ? void 0 : l.Cake;
|
|
526
|
+
if (!s) return r;
|
|
527
|
+
r.push({
|
|
528
|
+
enabled: !0,
|
|
529
|
+
handler: new s(a, this.options.cake),
|
|
530
|
+
title: "Draw Layer Cake (Subtractive Zones)"
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
return r;
|
|
534
|
+
}, _.add(i);
|
|
535
|
+
}
|
|
536
|
+
const T = class T extends C.Draw.Circle {
|
|
537
|
+
constructor(t, e) {
|
|
538
|
+
super(t, e), this.type = T.TYPE;
|
|
539
|
+
}
|
|
540
|
+
addHooks() {
|
|
541
|
+
super.addHooks();
|
|
542
|
+
const t = this._tooltip;
|
|
543
|
+
t != null && t.updateContent && t.updateContent({
|
|
544
|
+
text: "Click and drag to draw the Layer Cake base",
|
|
545
|
+
subtext: "Release mouse to finish base layer"
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
u(T, "TYPE", "cake");
|
|
550
|
+
let D = T;
|
|
551
|
+
C.Draw.Cake = D;
|
|
552
|
+
function Ze(i) {
|
|
553
|
+
const t = i.Draw;
|
|
554
|
+
if (!t || t.Cake) return;
|
|
555
|
+
const o = class o extends t.Circle {
|
|
556
|
+
constructor(r, n) {
|
|
557
|
+
super(r, n), this.type = o.TYPE;
|
|
558
|
+
}
|
|
559
|
+
addHooks() {
|
|
560
|
+
super.addHooks();
|
|
561
|
+
const r = this._tooltip;
|
|
562
|
+
r != null && r.updateContent && r.updateContent({
|
|
563
|
+
text: "Click and drag to draw the Layer Cake base",
|
|
564
|
+
subtext: "Release mouse to finish base layer"
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
u(o, "TYPE", "cake");
|
|
569
|
+
let e = o;
|
|
570
|
+
t.Cake = e;
|
|
571
|
+
}
|
|
572
|
+
const Ye = 63710088e-1;
|
|
573
|
+
function F(i) {
|
|
574
|
+
return i * Math.PI / 180;
|
|
575
|
+
}
|
|
576
|
+
function $(i) {
|
|
577
|
+
return i * 180 / Math.PI;
|
|
578
|
+
}
|
|
579
|
+
function je(i, t, e) {
|
|
580
|
+
const o = t / Ye, a = F(e), r = F(i.lat), n = F(i.lng), l = Math.sin(r), s = Math.cos(r), c = Math.sin(o), d = Math.cos(o), p = l * d + s * c * Math.cos(a), g = Math.asin(p), h = Math.sin(a) * c * s, m = d - l * p, A = n + Math.atan2(h, m);
|
|
581
|
+
return { lat: $(g), lng: $(A) };
|
|
582
|
+
}
|
|
583
|
+
function Ge(i) {
|
|
584
|
+
let t = 0;
|
|
585
|
+
for (let e = 0; e < i.length - 1; e++) {
|
|
586
|
+
const [o, a] = i[e], [r, n] = i[e + 1];
|
|
587
|
+
t += o * n - r * a;
|
|
588
|
+
}
|
|
589
|
+
return t / 2;
|
|
590
|
+
}
|
|
591
|
+
function Z(i) {
|
|
592
|
+
const t = i[0], e = i.at(-1);
|
|
593
|
+
return !t || !e || t[0] === e[0] && t[1] === e[1] ? i : [...i, t];
|
|
594
|
+
}
|
|
595
|
+
function Y(i, t) {
|
|
596
|
+
const e = Z(i);
|
|
597
|
+
if (Ge(e) < 0 === t) return e;
|
|
598
|
+
const r = [...e].reverse();
|
|
599
|
+
return Z(r);
|
|
600
|
+
}
|
|
601
|
+
function j(i, t, e) {
|
|
602
|
+
if (e < 4) throw new Error("steps must be >= 4");
|
|
603
|
+
const o = [];
|
|
604
|
+
for (let a = 0; a < e; a++) {
|
|
605
|
+
const r = a / e * 360, n = je(i, t, r);
|
|
606
|
+
o.push([n.lng, n.lat]);
|
|
607
|
+
}
|
|
608
|
+
return Z(o);
|
|
609
|
+
}
|
|
610
|
+
function qe(i) {
|
|
611
|
+
const { id: t, center: e, radiusMeters: o, layerIndex: a, steps: r } = i, n = Y(j(e, o, r), !1);
|
|
612
|
+
return {
|
|
613
|
+
type: "Feature",
|
|
614
|
+
properties: {
|
|
615
|
+
id: t,
|
|
616
|
+
layer_index: a,
|
|
617
|
+
radius_outer: o,
|
|
618
|
+
type: "core",
|
|
619
|
+
_meta: {
|
|
620
|
+
lat: e.lat,
|
|
621
|
+
lng: e.lng,
|
|
622
|
+
radius: o
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
geometry: { type: "Polygon", coordinates: [n] }
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
function Je(i) {
|
|
629
|
+
const {
|
|
630
|
+
id: t,
|
|
631
|
+
center: e,
|
|
632
|
+
radiusOuterMeters: o,
|
|
633
|
+
radiusInnerMeters: a,
|
|
634
|
+
layerIndex: r,
|
|
635
|
+
steps: n
|
|
636
|
+
} = i, l = Y(
|
|
637
|
+
j(e, o, n),
|
|
638
|
+
!1
|
|
639
|
+
), s = Y(
|
|
640
|
+
j(e, a, n),
|
|
641
|
+
!0
|
|
642
|
+
);
|
|
643
|
+
return {
|
|
644
|
+
type: "Feature",
|
|
645
|
+
properties: {
|
|
646
|
+
id: t,
|
|
647
|
+
layer_index: r,
|
|
648
|
+
radius_outer: o,
|
|
649
|
+
type: "ring",
|
|
650
|
+
_meta: {
|
|
651
|
+
lat: e.lat,
|
|
652
|
+
lng: e.lng,
|
|
653
|
+
radius: o
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
geometry: { type: "Polygon", coordinates: [l, s] }
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
function Qe(i) {
|
|
660
|
+
const { circles: t, steps: e = 64 } = i, o = [...t].sort((r, n) => r.getRadius() - n.getRadius()), a = [];
|
|
661
|
+
return o.forEach((r, n) => {
|
|
662
|
+
const l = r.getLatLng(), s = r.getRadius(), c = q();
|
|
663
|
+
if (n === 0) {
|
|
664
|
+
a.push(
|
|
665
|
+
qe({ id: c, center: l, radiusMeters: s, layerIndex: n, steps: e })
|
|
666
|
+
);
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
const p = o[n - 1].getRadius();
|
|
670
|
+
a.push(
|
|
671
|
+
Je({
|
|
672
|
+
id: c,
|
|
673
|
+
center: l,
|
|
674
|
+
radiusOuterMeters: s,
|
|
675
|
+
radiusInnerMeters: p,
|
|
676
|
+
layerIndex: n,
|
|
677
|
+
steps: e
|
|
678
|
+
})
|
|
679
|
+
);
|
|
680
|
+
}), { type: "FeatureCollection", features: a };
|
|
681
|
+
}
|
|
682
|
+
function R(i) {
|
|
683
|
+
i.preventDefault(), i.stopPropagation();
|
|
684
|
+
}
|
|
685
|
+
function Ke(i) {
|
|
686
|
+
var c, d;
|
|
687
|
+
const { root: t, addButtonId: e, saveButtonId: o, onAddRing: a, onSave: r } = i, n = (c = t.querySelector) == null ? void 0 : c.call(t, `#${e}`), l = (d = t.querySelector) == null ? void 0 : d.call(t, `#${o}`);
|
|
688
|
+
if (!n || !l) return;
|
|
689
|
+
const s = "data-cake-controls-bound";
|
|
690
|
+
if (!(n.hasAttribute(s) || l.hasAttribute(s))) {
|
|
691
|
+
n.setAttribute(s, "true"), l.setAttribute(s, "true");
|
|
692
|
+
for (const p of [n, l])
|
|
693
|
+
p.addEventListener("pointerdown", R), p.addEventListener("mousedown", R), p.addEventListener("touchstart", R);
|
|
694
|
+
n.addEventListener("click", (p) => {
|
|
695
|
+
R(p), a();
|
|
696
|
+
}), l.addEventListener("click", (p) => {
|
|
697
|
+
R(p), r();
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
function Xe(i) {
|
|
702
|
+
var e;
|
|
703
|
+
const t = (e = i.options) != null ? e : {};
|
|
704
|
+
t.original || (t.original = { ...t }), t.editing || (t.editing = { ...t });
|
|
705
|
+
}
|
|
706
|
+
function S(i, t) {
|
|
707
|
+
if (t === "imperial") {
|
|
708
|
+
const e = i * 3.28084;
|
|
709
|
+
return e >= 5280 ? `${(e / 5280).toFixed(2)} mi` : `${Math.round(e)} ft`;
|
|
710
|
+
}
|
|
711
|
+
return i >= 1e3 ? `${(i / 1e3).toFixed(2)} km` : `${Math.round(i)} m`;
|
|
712
|
+
}
|
|
713
|
+
class We {
|
|
714
|
+
constructor(t, e, o, a = "metric") {
|
|
715
|
+
u(this, "map");
|
|
716
|
+
u(this, "layers", []);
|
|
717
|
+
u(this, "controlsGroup");
|
|
718
|
+
u(this, "onSave");
|
|
719
|
+
u(this, "sessionId", q().slice(0, 8));
|
|
720
|
+
u(this, "baseCircleOptions");
|
|
721
|
+
u(this, "detachMapListeners", []);
|
|
722
|
+
u(this, "renderScheduled", !1);
|
|
723
|
+
u(this, "measurementSystem");
|
|
724
|
+
this.map = t, this.onSave = o, this.measurementSystem = a, this.controlsGroup = C.layerGroup().addTo(t), this.baseCircleOptions = { ...e.options }, delete this.baseCircleOptions.editing, delete this.baseCircleOptions.original, this.addLayer(e), this.installEditEventBridges(), this.renderControls();
|
|
725
|
+
}
|
|
726
|
+
installEditEventBridges() {
|
|
727
|
+
var d, p, g, h, m, A, x, y;
|
|
728
|
+
const t = C, e = (p = (d = t == null ? void 0 : t.Draw) == null ? void 0 : d.Event) == null ? void 0 : p.EDITMOVE, o = (h = (g = t == null ? void 0 : t.Draw) == null ? void 0 : g.Event) == null ? void 0 : h.EDITRESIZE, a = (A = (m = t == null ? void 0 : t.Draw) == null ? void 0 : m.Event) == null ? void 0 : A.EDITSTART, r = (y = (x = t == null ? void 0 : t.Draw) == null ? void 0 : x.Event) == null ? void 0 : y.EDITSTOP;
|
|
729
|
+
if (!e || !o) return;
|
|
730
|
+
const n = (f) => {
|
|
731
|
+
const b = f == null ? void 0 : f.layer;
|
|
732
|
+
b && this.layers.includes(b) && this.syncCenters(b);
|
|
733
|
+
}, l = (f) => {
|
|
734
|
+
const b = f == null ? void 0 : f.layer;
|
|
735
|
+
b && this.layers.includes(b) && (this.updateLabels(b), this.requestRenderControls());
|
|
736
|
+
}, s = (f) => {
|
|
737
|
+
var k;
|
|
738
|
+
const b = f == null ? void 0 : f.layer;
|
|
739
|
+
if (!b || !this.layers.includes(b)) return;
|
|
740
|
+
const w = b;
|
|
741
|
+
((k = w.getTooltip) == null ? void 0 : k.call(w)) && this.updateLabels(w);
|
|
742
|
+
}, c = () => {
|
|
743
|
+
this.layers.forEach((f) => {
|
|
744
|
+
var w;
|
|
745
|
+
const b = (w = f.getTooltip) == null ? void 0 : w.call(f);
|
|
746
|
+
b && (f.setTooltipContent(
|
|
747
|
+
S(f.getRadius(), this.measurementSystem)
|
|
748
|
+
), b.options.offset = [10, 0], b.options.direction = "right", f.closeTooltip(), f.openTooltip());
|
|
749
|
+
});
|
|
750
|
+
};
|
|
751
|
+
this.map.on(e, n), this.map.on(o, l), a && (this.map.on(a, s), this.detachMapListeners.push(() => this.map.off(a, s))), r && (this.map.on(r, c), this.detachMapListeners.push(() => this.map.off(r, c))), this.detachMapListeners.push(() => this.map.off(e, n)), this.detachMapListeners.push(() => this.map.off(o, l));
|
|
752
|
+
}
|
|
753
|
+
requestRenderControls() {
|
|
754
|
+
if (this.renderScheduled) return;
|
|
755
|
+
this.renderScheduled = !0, (typeof requestAnimationFrame == "function" ? requestAnimationFrame : (e) => setTimeout(() => e(0), 0))(() => {
|
|
756
|
+
this.renderScheduled = !1, this.renderControls();
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
addLayer(t) {
|
|
760
|
+
this.layers.push(t), t.addTo(this.map), t.bindTooltip(
|
|
761
|
+
S(t.getRadius(), this.measurementSystem),
|
|
762
|
+
{
|
|
763
|
+
permanent: !0,
|
|
764
|
+
direction: "right",
|
|
765
|
+
className: "cake-label",
|
|
766
|
+
offset: [10, 0]
|
|
767
|
+
}
|
|
768
|
+
);
|
|
769
|
+
const e = t.editing;
|
|
770
|
+
setTimeout(() => {
|
|
771
|
+
var o, a, r, n, l;
|
|
772
|
+
try {
|
|
773
|
+
if ((o = t.redraw) == null || o.call(t), Xe(t), (a = e == null ? void 0 : e.enabled) != null && a.call(e)) {
|
|
774
|
+
(r = e.updateMarkers) == null || r.call(e), this.requestRenderControls();
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
(n = e == null ? void 0 : e.enable) == null || n.call(e), (l = e == null ? void 0 : e.updateMarkers) == null || l.call(e), this.requestRenderControls();
|
|
778
|
+
} catch {
|
|
779
|
+
}
|
|
780
|
+
}, 0);
|
|
781
|
+
}
|
|
782
|
+
addRing() {
|
|
783
|
+
if (this.layers.length >= 10) return;
|
|
784
|
+
const t = this.getLargestCircle();
|
|
785
|
+
if (!t) return;
|
|
786
|
+
const e = t.getRadius() * 1.5, o = C.circle(t.getLatLng(), {
|
|
787
|
+
...this.baseCircleOptions,
|
|
788
|
+
radius: e
|
|
789
|
+
});
|
|
790
|
+
this.addLayer(o), this.renderControls();
|
|
791
|
+
}
|
|
792
|
+
save() {
|
|
793
|
+
const t = Qe({ circles: this.layers });
|
|
794
|
+
this.onSave(t), this.destroy();
|
|
795
|
+
}
|
|
796
|
+
getLargestCircle() {
|
|
797
|
+
return this.layers.length === 0 ? null : this.layers.reduce(
|
|
798
|
+
(t, e) => t.getRadius() > e.getRadius() ? t : e
|
|
799
|
+
);
|
|
800
|
+
}
|
|
801
|
+
syncCenters(t) {
|
|
802
|
+
const e = t.getLatLng();
|
|
803
|
+
this.layers.forEach((o) => {
|
|
804
|
+
var a, r, n;
|
|
805
|
+
o !== t && (o.setLatLng(e), (a = o.redraw) == null || a.call(o), (n = (r = o.editing) == null ? void 0 : r.updateMarkers) == null || n.call(r));
|
|
806
|
+
}), this.requestRenderControls();
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Update the label for the active circle being resized.
|
|
810
|
+
* Shows both total radius and delta (ring width) from the next smaller circle.
|
|
811
|
+
* Positions the tooltip on the left side to avoid toolbar interference.
|
|
812
|
+
*/
|
|
813
|
+
updateLabels(t) {
|
|
814
|
+
var n;
|
|
815
|
+
const e = t.getRadius();
|
|
816
|
+
let o = S(e, this.measurementSystem);
|
|
817
|
+
const a = this.layers.filter(
|
|
818
|
+
(l) => l !== t && l.getRadius() < e
|
|
819
|
+
);
|
|
820
|
+
if (a.length > 0) {
|
|
821
|
+
const l = a.reduce(
|
|
822
|
+
(d, p) => d.getRadius() > p.getRadius() ? d : p
|
|
823
|
+
), s = e - l.getRadius(), c = S(s, this.measurementSystem);
|
|
824
|
+
o = `${S(e, this.measurementSystem)} (+${c})`;
|
|
825
|
+
}
|
|
826
|
+
const r = (n = t.getTooltip) == null ? void 0 : n.call(t);
|
|
827
|
+
if (r) {
|
|
828
|
+
t.setTooltipContent(o);
|
|
829
|
+
const s = t.getBounds().getSouthWest();
|
|
830
|
+
s.lat = t.getLatLng().lat, r.options.direction = "left", r.options.offset = [-10, 0], r.setLatLng(s), t.closeTooltip(), t.openTooltip();
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
renderControls() {
|
|
834
|
+
this.controlsGroup.clearLayers();
|
|
835
|
+
const t = this.getLargestCircle();
|
|
836
|
+
if (!t) return;
|
|
837
|
+
const o = t.getBounds().getNorthEast(), a = `cake-add-${this.sessionId}`, r = `cake-save-${this.sessionId}`, n = C.divIcon({
|
|
838
|
+
className: "layer-cake-controls",
|
|
839
|
+
html: `
|
|
840
|
+
<div class="layer-cake-controls__container">
|
|
841
|
+
<button id="${a}" type="button">➕ Ring</button>
|
|
842
|
+
<button id="${r}" type="button" class="layer-cake-controls__save">💾 Save</button>
|
|
843
|
+
</div>
|
|
844
|
+
`,
|
|
845
|
+
iconSize: [140, 40],
|
|
846
|
+
iconAnchor: [-10, 20]
|
|
847
|
+
});
|
|
848
|
+
C.marker(o, {
|
|
849
|
+
icon: n,
|
|
850
|
+
interactive: !0,
|
|
851
|
+
keyboard: !1,
|
|
852
|
+
bubblingMouseEvents: !1
|
|
853
|
+
}).addTo(this.controlsGroup), setTimeout(() => {
|
|
854
|
+
const l = this.map.getContainer();
|
|
855
|
+
Ke({
|
|
856
|
+
root: l,
|
|
857
|
+
addButtonId: a,
|
|
858
|
+
saveButtonId: r,
|
|
859
|
+
onAddRing: () => this.addRing(),
|
|
860
|
+
onSave: () => this.save()
|
|
861
|
+
});
|
|
862
|
+
}, 0);
|
|
863
|
+
}
|
|
864
|
+
destroy() {
|
|
865
|
+
this.detachMapListeners.forEach((t) => {
|
|
866
|
+
try {
|
|
867
|
+
t();
|
|
868
|
+
} catch {
|
|
869
|
+
}
|
|
870
|
+
}), this.detachMapListeners = [], this.layers.forEach((t) => this.map.removeLayer(t)), this.layers = [], this.controlsGroup.clearLayers(), this.map.removeLayer(this.controlsGroup);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
const _e = `<?xml version="1.0" encoding="utf-8"?>
|
|
874
|
+
\r<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
875
|
+
<svg width="800px" height="800px" viewBox="0 -1.67 47.336 47.336" xmlns="http://www.w3.org/2000/svg">\r
|
|
876
|
+
<g id="Group_42" data-name="Group 42" transform="translate(-172.455 -364.36)">\r
|
|
877
|
+
<path id="Rectangle_17" data-name="Rectangle 17" d="M4.351,0H40.984a4.351,4.351,0,0,1,4.351,4.351V22.117a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z" transform="translate(173.455 384.243)" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>\r
|
|
878
|
+
<path id="Path_90" data-name="Path 90" d="M218.79,390.249a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.778,3.778,0,0,1-3.777-3.778" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>\r
|
|
879
|
+
<g id="Group_41" data-name="Group 41">\r
|
|
880
|
+
<path id="Rectangle_18" data-name="Rectangle 18" d="M4.351,0H26.473a4.351,4.351,0,0,1,4.351,4.351V17.883a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z" transform="translate(180.71 365.36)" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>\r
|
|
881
|
+
<path id="Path_91" data-name="Path 91" d="M211.234,370.794a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>\r
|
|
882
|
+
</g>\r
|
|
883
|
+
</g>\r
|
|
884
|
+
</svg>`, le = 6378137, L = 6356752314245e-6, B = 1 / 298.257223563, $e = Math.PI / 180, et = 180 / Math.PI, P = 1e9;
|
|
885
|
+
function tt(i) {
|
|
886
|
+
const t = BigInt(Math.round(i * P));
|
|
887
|
+
return Number(t) / P;
|
|
888
|
+
}
|
|
889
|
+
function z(i) {
|
|
890
|
+
return tt(i) * $e;
|
|
891
|
+
}
|
|
892
|
+
function ee(i) {
|
|
893
|
+
const t = i * et % 360;
|
|
894
|
+
return t < 0 ? t + 360 : t;
|
|
895
|
+
}
|
|
896
|
+
function G(i) {
|
|
897
|
+
const t = BigInt(Math.round(i * P));
|
|
898
|
+
return Number(t) / P;
|
|
899
|
+
}
|
|
900
|
+
function ot(i, t, e, o) {
|
|
901
|
+
const a = at(i, t, e, o);
|
|
902
|
+
if (a.converged)
|
|
903
|
+
return {
|
|
904
|
+
meters: G(a.distanceMeters),
|
|
905
|
+
bearingDegrees: ee(a.bearingRad),
|
|
906
|
+
algorithm: "vincenty",
|
|
907
|
+
iterations: a.iterations
|
|
908
|
+
};
|
|
909
|
+
const r = rt(i, t, e, o);
|
|
910
|
+
return {
|
|
911
|
+
meters: G(r.distanceMeters),
|
|
912
|
+
bearingDegrees: ee(r.bearingRad),
|
|
913
|
+
algorithm: "karney",
|
|
914
|
+
iterations: a.iterations
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
function at(i, t, e, o) {
|
|
918
|
+
const a = z(i), r = z(e), n = z(o - t), l = Math.atan((1 - B) * Math.tan(a)), s = Math.atan((1 - B) * Math.tan(r)), c = Math.sin(l), d = Math.cos(l), p = Math.sin(s), g = Math.cos(s);
|
|
919
|
+
let h = n, m = 0, A = 0;
|
|
920
|
+
const x = 200;
|
|
921
|
+
let y = 0, f = 0, b = 0, w = 0, E = 0, k = 0;
|
|
922
|
+
for (; Math.abs(h - m) > 1e-12 && A < x; ) {
|
|
923
|
+
const J = Math.sin(h), Q = Math.cos(h);
|
|
924
|
+
if (y = Math.sqrt(
|
|
925
|
+
(g * J) ** 2 + (d * p - c * g * Q) ** 2
|
|
926
|
+
), y === 0)
|
|
927
|
+
return {
|
|
928
|
+
distanceMeters: 0,
|
|
929
|
+
bearingRad: 0,
|
|
930
|
+
iterations: A,
|
|
931
|
+
converged: !0
|
|
932
|
+
};
|
|
933
|
+
f = c * p + d * g * Q, b = Math.atan2(y, f), w = d * g * J / y, E = 1 - w ** 2, k = E === 0 ? 0 : f - 2 * c * p / E;
|
|
934
|
+
const V = B / 16 * E * (4 + B * (4 - 3 * E));
|
|
935
|
+
m = h, h = n + (1 - V) * B * w * (b + V * y * (k + V * f * (-1 + 2 * k ** 2))), A += 1;
|
|
936
|
+
}
|
|
937
|
+
if (A >= x)
|
|
938
|
+
return {
|
|
939
|
+
distanceMeters: Number.NaN,
|
|
940
|
+
bearingRad: 0,
|
|
941
|
+
iterations: A,
|
|
942
|
+
converged: !1
|
|
943
|
+
};
|
|
944
|
+
const v = (le ** 2 - L ** 2) / L ** 2 * E, I = 1 + v / 16384 * (4096 + v * (-768 + v * (320 - 175 * v))), U = v / 1024 * (256 + v * (-128 + v * (74 - 47 * v))), ce = U * y * (k + U / 4 * (f * (-1 + 2 * k ** 2) - U / 6 * k * (-3 + 4 * y ** 2) * (-3 + 4 * k ** 2))), de = L * I * (b - ce), pe = Math.atan2(
|
|
945
|
+
g * Math.sin(h),
|
|
946
|
+
d * p - c * g * Math.cos(h)
|
|
947
|
+
);
|
|
948
|
+
return {
|
|
949
|
+
distanceMeters: de,
|
|
950
|
+
bearingRad: pe,
|
|
951
|
+
iterations: A,
|
|
952
|
+
converged: !0
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
function rt(i, t, e, o) {
|
|
956
|
+
const a = z(i), r = z(e), n = z(o - t), l = Math.atan((1 - B) * Math.tan(a)), s = Math.atan((1 - B) * Math.tan(r)), c = Math.sin(l), d = Math.cos(l), p = Math.sin(s), g = Math.cos(s), h = Math.sqrt(
|
|
957
|
+
(g * Math.sin(n)) ** 2 + (d * p - c * g * Math.cos(n)) ** 2
|
|
958
|
+
), m = c * p + d * g * Math.cos(n), A = Math.atan2(h, m);
|
|
959
|
+
if (A === 0)
|
|
960
|
+
return { distanceMeters: 0, bearingRad: 0 };
|
|
961
|
+
const y = 1 - (d * g * Math.sin(n) / Math.sin(A)) ** 2, f = y === 0 ? 0 : m - 2 * c * p / y, b = (le ** 2 - L ** 2) / L ** 2 * y, w = 1 + b / 16384 * (4096 + b * (-768 + b * (320 - 175 * b))), E = b / 1024 * (256 + b * (-128 + b * (74 - 47 * b))), k = E * h * (f + E / 4 * (m * (-1 + 2 * f ** 2) - E / 6 * f * (-3 + 4 * h ** 2) * (-3 + 4 * f ** 2))), v = L * w * (A - k), I = Math.atan2(
|
|
962
|
+
g * Math.sin(n),
|
|
963
|
+
d * p - c * g * Math.cos(n)
|
|
964
|
+
);
|
|
965
|
+
return { distanceMeters: v, bearingRad: I };
|
|
966
|
+
}
|
|
967
|
+
const nt = {
|
|
968
|
+
position: "topleft",
|
|
969
|
+
circleMarker: {
|
|
970
|
+
color: "red",
|
|
971
|
+
radius: 2
|
|
972
|
+
},
|
|
973
|
+
lineStyle: {
|
|
974
|
+
color: "red",
|
|
975
|
+
dashArray: "1,6"
|
|
976
|
+
},
|
|
977
|
+
angleUnit: {
|
|
978
|
+
display: "°",
|
|
979
|
+
decimal: 2,
|
|
980
|
+
factor: null,
|
|
981
|
+
label: "Bearing:"
|
|
982
|
+
}
|
|
983
|
+
}, it = {
|
|
984
|
+
display: "km",
|
|
985
|
+
decimal: 2,
|
|
986
|
+
factor: null,
|
|
987
|
+
label: "Distance (km):"
|
|
988
|
+
}, lt = {
|
|
989
|
+
display: "mi",
|
|
990
|
+
decimal: 2,
|
|
991
|
+
factor: 0.621371,
|
|
992
|
+
label: "Distance (mi):"
|
|
993
|
+
};
|
|
994
|
+
function st(i) {
|
|
995
|
+
const t = i === "imperial" ? { ...lt } : { ...it };
|
|
996
|
+
return {
|
|
997
|
+
...nt,
|
|
998
|
+
lengthUnit: t
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
const ct = {
|
|
1002
|
+
metric: "Meters / Kilometers",
|
|
1003
|
+
imperial: "Feet / Miles"
|
|
1004
|
+
};
|
|
1005
|
+
function H(i, t = {}) {
|
|
1006
|
+
var r, n;
|
|
1007
|
+
const e = !!((r = i == null ? void 0 : i.Control) != null && r.Draw), o = !!i.draw, a = e && o;
|
|
1008
|
+
return a || (n = t.onError) == null || n.call(
|
|
1009
|
+
t,
|
|
1010
|
+
"Leaflet.draw is not available on the provided Leaflet instance"
|
|
1011
|
+
), a;
|
|
1012
|
+
}
|
|
1013
|
+
let te = !1;
|
|
1014
|
+
class dt {
|
|
1015
|
+
constructor(t) {
|
|
1016
|
+
u(this, "container");
|
|
1017
|
+
u(this, "logger");
|
|
1018
|
+
u(this, "options");
|
|
1019
|
+
// Active Leaflet namespace (injected or bundled fallback)
|
|
1020
|
+
u(this, "L");
|
|
1021
|
+
// Data store (id-centric)
|
|
1022
|
+
u(this, "store");
|
|
1023
|
+
// Leaflet entities
|
|
1024
|
+
u(this, "map", null);
|
|
1025
|
+
u(this, "drawnItems", null);
|
|
1026
|
+
// Keep 'any' here to avoid type friction across different @types/leaflet-draw versions
|
|
1027
|
+
u(this, "drawControl", null);
|
|
1028
|
+
u(this, "rulerControl", null);
|
|
1029
|
+
u(this, "measurementControl", null);
|
|
1030
|
+
u(this, "measurementSystem", "metric");
|
|
1031
|
+
u(this, "measurementModalOverlay", null);
|
|
1032
|
+
u(this, "measurementModalDialog", null);
|
|
1033
|
+
u(this, "measurementModalRadios", {});
|
|
1034
|
+
u(this, "measurementModalKeydownHandler", null);
|
|
1035
|
+
// Detacher for our polygon close-on-first-vertex patch
|
|
1036
|
+
u(this, "detachPolygonFinishPatch", null);
|
|
1037
|
+
// Context menu for vertex deletion
|
|
1038
|
+
u(this, "vertexMenuEl", null);
|
|
1039
|
+
u(this, "vertexMenuCleanup", null);
|
|
1040
|
+
u(this, "activeCakeSession", null);
|
|
1041
|
+
var e;
|
|
1042
|
+
this.options = t, this.container = t.container, this.logger = ((e = t.logger) != null ? e : N("controller", "debug")).child(
|
|
1043
|
+
"map"
|
|
1044
|
+
), this.L = this.resolveLeaflet(t), this.store = new Fe(this.logger.child("store")), this.logger.debug("ctor", {
|
|
1045
|
+
config: t.map,
|
|
1046
|
+
controls: t.controls,
|
|
1047
|
+
readOnly: t.readOnly,
|
|
1048
|
+
useExternalLeaflet: t.useExternalLeaflet
|
|
1049
|
+
}), Ze(this.L), He(this.L);
|
|
1050
|
+
}
|
|
1051
|
+
resolveLeaflet(t) {
|
|
1052
|
+
if (!t.useExternalLeaflet)
|
|
1053
|
+
return C;
|
|
1054
|
+
if (t.leaflet && H(t.leaflet))
|
|
1055
|
+
return this.logger.debug("leaflet-runtime:external-injected"), t.leaflet;
|
|
1056
|
+
const o = globalThis.L;
|
|
1057
|
+
return o && H(o) ? (this.logger.debug("leaflet-runtime:external-global"), o) : (this.logger.warn("leaflet-runtime:external-fallback-bundled", {
|
|
1058
|
+
message: "External Leaflet requested but Draw APIs were missing; falling back to bundled Leaflet/Draw"
|
|
1059
|
+
}), C);
|
|
1060
|
+
}
|
|
1061
|
+
// ---------------- Lifecycle ----------------
|
|
1062
|
+
async init() {
|
|
1063
|
+
var e, o, a, r, n, l;
|
|
1064
|
+
const t = (o = (e = performance.now) == null ? void 0 : e.call(performance)) != null ? o : Date.now();
|
|
1065
|
+
try {
|
|
1066
|
+
await this.destroy();
|
|
1067
|
+
const {
|
|
1068
|
+
latitude: s,
|
|
1069
|
+
longitude: c,
|
|
1070
|
+
zoom: d,
|
|
1071
|
+
minZoom: p,
|
|
1072
|
+
maxZoom: g,
|
|
1073
|
+
tileUrl: h,
|
|
1074
|
+
tileAttribution: m,
|
|
1075
|
+
preferCanvas: A = !0,
|
|
1076
|
+
// Default to Canvas rendering for better performance
|
|
1077
|
+
useExternalLeaflet: x
|
|
1078
|
+
} = this.options.map, y = [s, c], f = this.L;
|
|
1079
|
+
x && H(f, {
|
|
1080
|
+
onError: (v) => this.logger.warn("external-leaflet-missing-draw", { message: v })
|
|
1081
|
+
}), this.map = f.map(this.container, {
|
|
1082
|
+
zoomControl: !0,
|
|
1083
|
+
preferCanvas: A
|
|
1084
|
+
}).setView(y, d), f.tileLayer(h, {
|
|
1085
|
+
attribution: m,
|
|
1086
|
+
minZoom: p,
|
|
1087
|
+
maxZoom: g
|
|
1088
|
+
}).addTo(this.map), this.drawnItems = f.featureGroup().addTo(this.map);
|
|
1089
|
+
const b = this.buildDrawOptions(
|
|
1090
|
+
this.options.controls,
|
|
1091
|
+
!!this.options.readOnly
|
|
1092
|
+
), w = f.Control.Draw;
|
|
1093
|
+
this.drawControl = new w(b), this.map.addControl(this.drawControl), this.applyLayerCakeToolbarIcon(), this.options.controls.ruler && (this.logger.debug("init:ruler", {
|
|
1094
|
+
available: typeof f.control.ruler == "function"
|
|
1095
|
+
}), typeof f.control.ruler == "function" ? (this.addRulerControl(), this.installMeasurementSettingsControl()) : this.logger.warn("init:ruler:missing", {
|
|
1096
|
+
msg: "L.control.ruler is not defined"
|
|
1097
|
+
})), this.patchLeafletDrawBugs(), this.installPolygonFinishPatch(), this.map.invalidateSize(), setTimeout(() => {
|
|
1098
|
+
var v;
|
|
1099
|
+
try {
|
|
1100
|
+
(v = this.map) == null || v.invalidateSize();
|
|
1101
|
+
} catch {
|
|
1102
|
+
}
|
|
1103
|
+
}, 0), this.bindDrawEvents();
|
|
1104
|
+
const E = ((r = (a = performance.now) == null ? void 0 : a.call(performance)) != null ? r : Date.now()) - t;
|
|
1105
|
+
this.logger.debug("init:ready", { elapsedMs: Math.round(E) });
|
|
1106
|
+
const k = this.store.bounds();
|
|
1107
|
+
(l = (n = this.options.callbacks) == null ? void 0 : n.onReady) == null || l.call(n, k ? { bounds: k } : {});
|
|
1108
|
+
} catch (s) {
|
|
1109
|
+
this._error("Failed to initialize Leaflet map", s);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
async destroy() {
|
|
1113
|
+
var t, e, o;
|
|
1114
|
+
try {
|
|
1115
|
+
this.map && (this.map.off(), this.map.remove());
|
|
1116
|
+
} catch (a) {
|
|
1117
|
+
this._error("Failed to remove Leaflet map", a);
|
|
1118
|
+
}
|
|
1119
|
+
try {
|
|
1120
|
+
(t = this.detachPolygonFinishPatch) == null || t.call(this);
|
|
1121
|
+
} catch {
|
|
1122
|
+
}
|
|
1123
|
+
this.detachPolygonFinishPatch = null;
|
|
1124
|
+
try {
|
|
1125
|
+
(e = this.vertexMenuCleanup) == null || e.call(this);
|
|
1126
|
+
} catch {
|
|
1127
|
+
}
|
|
1128
|
+
this.vertexMenuEl = null, this.vertexMenuCleanup = null, this.drawControl = null, this.rulerControl = null, this.measurementControl = null, this.removeMeasurementModal(), this.drawnItems = null;
|
|
1129
|
+
try {
|
|
1130
|
+
(o = this.activeCakeSession) == null || o.destroy();
|
|
1131
|
+
} catch {
|
|
1132
|
+
}
|
|
1133
|
+
this.activeCakeSession = null, this.map = null;
|
|
1134
|
+
}
|
|
1135
|
+
// ---------------- Public API (data) ----------------
|
|
1136
|
+
async getGeoJSON() {
|
|
1137
|
+
return this.store.toFeatureCollection();
|
|
1138
|
+
}
|
|
1139
|
+
async loadGeoJSON(t, e = !1) {
|
|
1140
|
+
if (!this.map || !this.drawnItems) return;
|
|
1141
|
+
await this.clearLayers();
|
|
1142
|
+
const o = W(t), a = this.store.add(o), r = this.L.geoJSON(o);
|
|
1143
|
+
let n = 0;
|
|
1144
|
+
r.eachLayer((l) => {
|
|
1145
|
+
var s;
|
|
1146
|
+
l._fid = (s = a[n]) != null ? s : a[a.length - 1], this.drawnItems.addLayer(l), this.installVertexContextMenu(l), n++;
|
|
1147
|
+
}), this.logger.debug("loadGeoJSON", {
|
|
1148
|
+
count: o.features.length,
|
|
1149
|
+
ids: a
|
|
1150
|
+
}), e && await this.fitBoundsToData();
|
|
1151
|
+
}
|
|
1152
|
+
async clearLayers() {
|
|
1153
|
+
this.drawnItems && this.drawnItems.clearLayers(), this.store.clear();
|
|
1154
|
+
}
|
|
1155
|
+
async addFeatures(t) {
|
|
1156
|
+
if (!this.map || !this.drawnItems) return [];
|
|
1157
|
+
const e = W(t), o = this.store.add(e), a = this.L.geoJSON(e);
|
|
1158
|
+
let r = 0;
|
|
1159
|
+
return a.eachLayer((n) => {
|
|
1160
|
+
var l;
|
|
1161
|
+
n._fid = (l = o[r]) != null ? l : o[o.length - 1], this.drawnItems.addLayer(n), this.installVertexContextMenu(n), r++;
|
|
1162
|
+
}), o;
|
|
1163
|
+
}
|
|
1164
|
+
async updateFeature(t, e) {
|
|
1165
|
+
this.store.update(t, e);
|
|
1166
|
+
}
|
|
1167
|
+
async removeFeature(t) {
|
|
1168
|
+
this.drawnItems && this.drawnItems.eachLayer((e) => {
|
|
1169
|
+
e._fid === t && this.drawnItems.removeLayer(e);
|
|
1170
|
+
}), this.store.remove(t);
|
|
1171
|
+
}
|
|
1172
|
+
// ---------------- Public API (map) ----------------
|
|
1173
|
+
async fitBoundsToData(t = 0.05) {
|
|
1174
|
+
if (!this.map) return;
|
|
1175
|
+
const e = this.store.bounds();
|
|
1176
|
+
if (!e) return;
|
|
1177
|
+
const o = e, a = this.L.latLngBounds(o);
|
|
1178
|
+
if (t > 0) {
|
|
1179
|
+
const r = a.getSouthWest(), n = a.getNorthEast(), l = (n.lat - r.lat) * t, s = (n.lng - r.lng) * t, c = this.L.latLngBounds(
|
|
1180
|
+
this.L.latLng(r.lat - l, r.lng - s),
|
|
1181
|
+
this.L.latLng(n.lat + l, n.lng + s)
|
|
1182
|
+
);
|
|
1183
|
+
this.map.fitBounds(c);
|
|
1184
|
+
} else
|
|
1185
|
+
this.map.fitBounds(a);
|
|
1186
|
+
}
|
|
1187
|
+
async fitBounds(t, e = 0.05) {
|
|
1188
|
+
if (!this.map) return;
|
|
1189
|
+
const o = this.L.latLngBounds(t);
|
|
1190
|
+
if (e > 0) {
|
|
1191
|
+
const a = o.getSouthWest(), r = o.getNorthEast(), n = (r.lat - a.lat) * e, l = (r.lng - a.lng) * e, s = this.L.latLngBounds(
|
|
1192
|
+
this.L.latLng(a.lat - n, a.lng - l),
|
|
1193
|
+
this.L.latLng(r.lat + n, r.lng + l)
|
|
1194
|
+
);
|
|
1195
|
+
this.map.fitBounds(s);
|
|
1196
|
+
} else
|
|
1197
|
+
this.map.fitBounds(o);
|
|
1198
|
+
}
|
|
1199
|
+
async setView(t, e, o) {
|
|
1200
|
+
this.map && this.map.setView([t, e], o != null ? o : this.map.getZoom());
|
|
1201
|
+
}
|
|
1202
|
+
/**
|
|
1203
|
+
* Merge all visible polygon features into a single polygon feature.
|
|
1204
|
+
* This removes the original features and adds a new feature with the merged geometry.
|
|
1205
|
+
*
|
|
1206
|
+
* @param options Optional configuration for the merge operation
|
|
1207
|
+
* @returns The ID of the newly created merged feature, or null if no polygons to merge
|
|
1208
|
+
*/
|
|
1209
|
+
async mergeVisiblePolygons(t) {
|
|
1210
|
+
if (!this.map || !this.drawnItems) return null;
|
|
1211
|
+
const o = (await this.getGeoJSON()).features.filter((l) => {
|
|
1212
|
+
const s = l.geometry;
|
|
1213
|
+
return s && (ne(s) || ie(s));
|
|
1214
|
+
});
|
|
1215
|
+
if (o.length <= 1) {
|
|
1216
|
+
if (o.length === 1) {
|
|
1217
|
+
const l = o[0].id;
|
|
1218
|
+
return l ? String(l) : null;
|
|
1219
|
+
}
|
|
1220
|
+
return null;
|
|
1221
|
+
}
|
|
1222
|
+
const a = Ve(o, t == null ? void 0 : t.properties);
|
|
1223
|
+
if (!a) return null;
|
|
1224
|
+
const r = [];
|
|
1225
|
+
for (const l of o) {
|
|
1226
|
+
const s = l.id;
|
|
1227
|
+
s && r.push(String(s));
|
|
1228
|
+
}
|
|
1229
|
+
for (const l of r)
|
|
1230
|
+
await this.removeFeature(l);
|
|
1231
|
+
const [n] = await this.addFeatures({
|
|
1232
|
+
type: "FeatureCollection",
|
|
1233
|
+
features: [a]
|
|
1234
|
+
});
|
|
1235
|
+
return n || null;
|
|
1236
|
+
}
|
|
1237
|
+
setRulerUnits(t) {
|
|
1238
|
+
this.measurementSystem !== t && (this.measurementSystem = t, this.logger.debug("ruler:units", { system: t }), this.syncMeasurementModalState(), this.rebuildRulerControl());
|
|
1239
|
+
}
|
|
1240
|
+
// ---------------- Internals ----------------
|
|
1241
|
+
buildDrawOptions(t, e) {
|
|
1242
|
+
var r;
|
|
1243
|
+
const o = {
|
|
1244
|
+
polygon: t.polygon ? {
|
|
1245
|
+
allowIntersection: (r = this.options.map.polygonAllowIntersection) != null ? r : !1,
|
|
1246
|
+
// Disallow self-intersections by default
|
|
1247
|
+
showArea: !0,
|
|
1248
|
+
// Display area tooltip while drawing
|
|
1249
|
+
shapeOptions: {
|
|
1250
|
+
color: "#3388ff"
|
|
1251
|
+
// Default shape color
|
|
1252
|
+
}
|
|
1253
|
+
} : !1,
|
|
1254
|
+
polyline: t.polyline ? {
|
|
1255
|
+
shapeOptions: {
|
|
1256
|
+
color: "#3388ff"
|
|
1257
|
+
}
|
|
1258
|
+
} : !1,
|
|
1259
|
+
rectangle: t.rectangle ? {
|
|
1260
|
+
shapeOptions: {
|
|
1261
|
+
color: "#3388ff"
|
|
1262
|
+
}
|
|
1263
|
+
} : !1,
|
|
1264
|
+
circle: t.circle ? {
|
|
1265
|
+
shapeOptions: {
|
|
1266
|
+
color: "#3388ff"
|
|
1267
|
+
}
|
|
1268
|
+
} : !1,
|
|
1269
|
+
cake: t.cake ? {
|
|
1270
|
+
shapeOptions: {
|
|
1271
|
+
color: "#8A2BE2",
|
|
1272
|
+
// Violet color for distinction
|
|
1273
|
+
fillOpacity: 0.2
|
|
1274
|
+
}
|
|
1275
|
+
} : !1,
|
|
1276
|
+
marker: t.marker ? {} : !1
|
|
1277
|
+
};
|
|
1278
|
+
let a = {
|
|
1279
|
+
featureGroup: this.drawnItems
|
|
1280
|
+
};
|
|
1281
|
+
return t.edit ? t.delete === !1 && (a.remove = !1) : a = !1, e ? {
|
|
1282
|
+
draw: !1,
|
|
1283
|
+
edit: !1
|
|
1284
|
+
} : { draw: o, edit: a };
|
|
1285
|
+
}
|
|
1286
|
+
applyLayerCakeToolbarIcon() {
|
|
1287
|
+
if (!this.container) return;
|
|
1288
|
+
const t = () => {
|
|
1289
|
+
const e = this.container.querySelector(
|
|
1290
|
+
"a.leaflet-draw-draw-cake"
|
|
1291
|
+
);
|
|
1292
|
+
if (!e) return;
|
|
1293
|
+
e.style.setProperty("background-image", "none", "important"), e.style.setProperty("background-color", "#fff", "important"), e.style.setProperty("position", "relative", "important");
|
|
1294
|
+
let o = e.querySelector(
|
|
1295
|
+
".leaflet-geokit-cake-icon"
|
|
1296
|
+
);
|
|
1297
|
+
o || (o = document.createElement("span"), o.className = "leaflet-geokit-cake-icon", o.setAttribute("aria-hidden", "true"), e.appendChild(o)), o.style.setProperty("position", "absolute", "important"), o.style.setProperty("display", "block", "important"), o.style.setProperty("left", "50%", "important"), o.style.setProperty("top", "50%", "important"), o.style.setProperty("width", "18px", "important"), o.style.setProperty("height", "18px", "important"), o.style.setProperty("transform", "translate(-50%, -50%)", "important"), o.style.setProperty("pointer-events", "none", "important"), o.firstElementChild || (o.innerHTML = _e);
|
|
1298
|
+
const a = o.firstElementChild;
|
|
1299
|
+
a && (a.style.setProperty("width", "100%", "important"), a.style.setProperty("height", "100%", "important"), a.style.setProperty("display", "block", "important"));
|
|
1300
|
+
};
|
|
1301
|
+
t(), setTimeout(t, 0);
|
|
1302
|
+
}
|
|
1303
|
+
/* c8 ignore start */
|
|
1304
|
+
addRulerControl() {
|
|
1305
|
+
if (!this.map) return;
|
|
1306
|
+
this.installRulerPrecisionPatch();
|
|
1307
|
+
const t = st(this.measurementSystem);
|
|
1308
|
+
this.rulerControl = this.L.control.ruler(t), this.map.addControl(this.rulerControl);
|
|
1309
|
+
}
|
|
1310
|
+
installRulerPrecisionPatch() {
|
|
1311
|
+
if (te) return;
|
|
1312
|
+
const t = this.L.Control.Ruler;
|
|
1313
|
+
if (!t || typeof t != "function") return;
|
|
1314
|
+
const e = t.prototype, o = e._calculateBearingAndDistance;
|
|
1315
|
+
if (typeof o != "function") return;
|
|
1316
|
+
const a = this.logger;
|
|
1317
|
+
e._calculateBearingAndDistance = function() {
|
|
1318
|
+
var n, l, s;
|
|
1319
|
+
o.call(this);
|
|
1320
|
+
try {
|
|
1321
|
+
const c = this._clickedLatLong, d = (n = this._movingLatLong) != null ? n : this._clickedLatLong;
|
|
1322
|
+
if (!c || !d) return;
|
|
1323
|
+
const { meters: p, bearingDegrees: g } = ot(
|
|
1324
|
+
c.lat,
|
|
1325
|
+
c.lng,
|
|
1326
|
+
d.lat,
|
|
1327
|
+
d.lng
|
|
1328
|
+
), h = p / 1e3, m = typeof ((s = (l = this.options) == null ? void 0 : l.lengthUnit) == null ? void 0 : s.factor) == "number" ? this.options.lengthUnit.factor : 1, A = G(h * m);
|
|
1329
|
+
this._result = this._result || {}, this._result.Distance = A, this._result.Bearing = g, this._result.meters = p;
|
|
1330
|
+
} catch (c) {
|
|
1331
|
+
a == null || a.warn("ruler:precision-patch", c);
|
|
1332
|
+
}
|
|
1333
|
+
}, te = !0;
|
|
1334
|
+
}
|
|
1335
|
+
rebuildRulerControl() {
|
|
1336
|
+
if (!(!this.map || !this.options.controls.ruler)) {
|
|
1337
|
+
if (this.rulerControl) {
|
|
1338
|
+
try {
|
|
1339
|
+
this.map.removeControl(this.rulerControl);
|
|
1340
|
+
} catch (t) {
|
|
1341
|
+
this.logger.warn("ruler:remove-failed", t);
|
|
1342
|
+
}
|
|
1343
|
+
this.rulerControl = null;
|
|
1344
|
+
}
|
|
1345
|
+
this.addRulerControl();
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
/* c8 ignore next */
|
|
1349
|
+
installMeasurementSettingsControl() {
|
|
1350
|
+
if (!this.map || this.measurementControl) return;
|
|
1351
|
+
const t = this, e = this.L.Control.extend({
|
|
1352
|
+
options: { position: "topleft" },
|
|
1353
|
+
onAdd() {
|
|
1354
|
+
const o = t.L.DomUtil.create(
|
|
1355
|
+
"div",
|
|
1356
|
+
"leaflet-bar leaflet-ruler-settings-control"
|
|
1357
|
+
), a = t.L.DomUtil.create(
|
|
1358
|
+
"button",
|
|
1359
|
+
"leaflet-ruler-settings-button",
|
|
1360
|
+
o
|
|
1361
|
+
);
|
|
1362
|
+
return a.type = "button", a.title = "Measurement settings", a.setAttribute("aria-label", "Measurement settings"), a.addEventListener("click", (r) => {
|
|
1363
|
+
r.preventDefault(), r.stopPropagation(), t.toggleMeasurementModal(!0);
|
|
1364
|
+
}), t.L.DomEvent.disableClickPropagation(o), t.L.DomEvent.disableScrollPropagation(o), o;
|
|
1365
|
+
}
|
|
1366
|
+
});
|
|
1367
|
+
this.measurementControl = new e(), this.map.addControl(this.measurementControl);
|
|
1368
|
+
}
|
|
1369
|
+
/* c8 ignore next */
|
|
1370
|
+
ensureMeasurementModal() {
|
|
1371
|
+
if (this.measurementModalOverlay) return this.measurementModalOverlay;
|
|
1372
|
+
if (typeof document == "undefined")
|
|
1373
|
+
throw new Error("Measurement modal requires a browser environment");
|
|
1374
|
+
const t = document.createElement("div");
|
|
1375
|
+
t.className = "leaflet-ruler-modal-overlay", t.setAttribute("aria-hidden", "true");
|
|
1376
|
+
const e = document.createElement("div");
|
|
1377
|
+
e.className = "leaflet-ruler-modal", e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.tabIndex = -1, t.addEventListener("click", (s) => {
|
|
1378
|
+
s.target === t && this.toggleMeasurementModal(!1);
|
|
1379
|
+
});
|
|
1380
|
+
const o = document.createElement("h2");
|
|
1381
|
+
o.className = "leaflet-ruler-modal-title", o.textContent = "Measurement Units", e.appendChild(o);
|
|
1382
|
+
const a = document.createElement("p");
|
|
1383
|
+
a.className = "leaflet-ruler-modal-description", a.textContent = "Choose how the measurement tool reports distances.", e.appendChild(a);
|
|
1384
|
+
const r = document.createElement("div");
|
|
1385
|
+
r.className = "leaflet-ruler-modal-options", e.appendChild(r), ["metric", "imperial"].forEach((s) => {
|
|
1386
|
+
const c = document.createElement("label");
|
|
1387
|
+
c.className = "leaflet-ruler-modal-option";
|
|
1388
|
+
const d = document.createElement("input");
|
|
1389
|
+
d.type = "radio", d.name = "leaflet-ruler-units", d.value = s, d.addEventListener("change", () => {
|
|
1390
|
+
d.checked && this.setRulerUnits(s);
|
|
1391
|
+
});
|
|
1392
|
+
const p = document.createElement("span");
|
|
1393
|
+
p.textContent = ct[s], c.appendChild(d), c.appendChild(p), r.appendChild(c), this.measurementModalRadios[s] = d;
|
|
1394
|
+
});
|
|
1395
|
+
const n = document.createElement("div");
|
|
1396
|
+
n.className = "leaflet-ruler-modal-actions";
|
|
1397
|
+
const l = document.createElement("button");
|
|
1398
|
+
return l.type = "button", l.className = "leaflet-ruler-modal-close", l.textContent = "Close", l.addEventListener("click", () => this.toggleMeasurementModal(!1)), n.appendChild(l), e.appendChild(n), t.appendChild(e), this.container.appendChild(t), this.measurementModalOverlay = t, this.measurementModalDialog = e, this.syncMeasurementModalState(), t;
|
|
1399
|
+
}
|
|
1400
|
+
/* c8 ignore next */
|
|
1401
|
+
toggleMeasurementModal(t) {
|
|
1402
|
+
var o;
|
|
1403
|
+
if (!t) {
|
|
1404
|
+
this.measurementModalOverlay && (this.measurementModalOverlay.classList.remove("is-open"), this.measurementModalOverlay.setAttribute("aria-hidden", "true")), this.detachMeasurementModalKeydown();
|
|
1405
|
+
return;
|
|
1406
|
+
}
|
|
1407
|
+
const e = this.ensureMeasurementModal();
|
|
1408
|
+
e.classList.add("is-open"), e.setAttribute("aria-hidden", "false"), this.syncMeasurementModalState(), this.attachMeasurementModalKeydown(), (o = this.measurementModalDialog) == null || o.focus();
|
|
1409
|
+
}
|
|
1410
|
+
syncMeasurementModalState() {
|
|
1411
|
+
for (const [t, e] of Object.entries(this.measurementModalRadios))
|
|
1412
|
+
e && (e.checked = t === this.measurementSystem);
|
|
1413
|
+
}
|
|
1414
|
+
/* c8 ignore next */
|
|
1415
|
+
removeMeasurementModal() {
|
|
1416
|
+
this.measurementModalOverlay && this.measurementModalOverlay.remove(), this.measurementModalOverlay = null, this.measurementModalDialog = null, this.measurementModalRadios = {}, this.detachMeasurementModalKeydown();
|
|
1417
|
+
}
|
|
1418
|
+
/* c8 ignore next */
|
|
1419
|
+
attachMeasurementModalKeydown() {
|
|
1420
|
+
this.measurementModalKeydownHandler || typeof document == "undefined" || (this.measurementModalKeydownHandler = (t) => {
|
|
1421
|
+
t.key === "Escape" && this.toggleMeasurementModal(!1);
|
|
1422
|
+
}, document.addEventListener("keydown", this.measurementModalKeydownHandler));
|
|
1423
|
+
}
|
|
1424
|
+
/* c8 ignore next */
|
|
1425
|
+
detachMeasurementModalKeydown() {
|
|
1426
|
+
!this.measurementModalKeydownHandler || typeof document == "undefined" || (document.removeEventListener(
|
|
1427
|
+
"keydown",
|
|
1428
|
+
this.measurementModalKeydownHandler
|
|
1429
|
+
), this.measurementModalKeydownHandler = null);
|
|
1430
|
+
}
|
|
1431
|
+
/* c8 ignore end */
|
|
1432
|
+
/**
|
|
1433
|
+
* Workaround: In some environments (notably within Shadow DOM), clicking the first vertex
|
|
1434
|
+
* to close a polygon can be unreliable due to event retargeting/hit testing.
|
|
1435
|
+
* This patch listens for map clicks while the polygon draw handler is enabled and,
|
|
1436
|
+
* if the click is within a small pixel radius of the first vertex, it triggers finishShape().
|
|
1437
|
+
*/
|
|
1438
|
+
installPolygonFinishPatch() {
|
|
1439
|
+
var n, l, s, c, d;
|
|
1440
|
+
if (!this.map || !this.drawControl) return;
|
|
1441
|
+
try {
|
|
1442
|
+
(n = this.detachPolygonFinishPatch) == null || n.call(this);
|
|
1443
|
+
} catch {
|
|
1444
|
+
}
|
|
1445
|
+
this.detachPolygonFinishPatch = null;
|
|
1446
|
+
const t = this.map, e = (s = (l = this.drawControl) == null ? void 0 : l._toolbars) == null ? void 0 : s.draw;
|
|
1447
|
+
if (!e || !!!((d = (c = e._modes) == null ? void 0 : c.polygon) != null && d.handler)) return;
|
|
1448
|
+
const a = 10, r = (p) => {
|
|
1449
|
+
var g, h, m, A, x, y, f, b;
|
|
1450
|
+
try {
|
|
1451
|
+
const w = (h = (g = e._modes) == null ? void 0 : g.polygon) == null ? void 0 : h.handler;
|
|
1452
|
+
if (!w || !w._enabled) return;
|
|
1453
|
+
const E = w._markers;
|
|
1454
|
+
if (!Array.isArray(E) || E.length < 4) return;
|
|
1455
|
+
const k = (A = (m = E[0]) == null ? void 0 : m.getLatLng) == null ? void 0 : A.call(m);
|
|
1456
|
+
if (!k) return;
|
|
1457
|
+
const v = t.latLngToContainerPoint(k), I = t.latLngToContainerPoint(p.latlng);
|
|
1458
|
+
Math.hypot(v.x - I.x, v.y - I.y) <= a && typeof w._finishShape == "function" && ((y = (x = p.originalEvent) == null ? void 0 : x.preventDefault) == null || y.call(x), (b = (f = p.originalEvent) == null ? void 0 : f.stopPropagation) == null || b.call(f), w._finishShape());
|
|
1459
|
+
} catch (w) {
|
|
1460
|
+
this._error("polygon-finish-patch", w);
|
|
1461
|
+
}
|
|
1462
|
+
};
|
|
1463
|
+
t.on("click", r), this.detachPolygonFinishPatch = () => {
|
|
1464
|
+
try {
|
|
1465
|
+
t.off("click", r);
|
|
1466
|
+
} catch {
|
|
1467
|
+
}
|
|
1468
|
+
};
|
|
1469
|
+
}
|
|
1470
|
+
patchLeafletDrawBugs() {
|
|
1471
|
+
var t, e, o, a, r;
|
|
1472
|
+
try {
|
|
1473
|
+
const n = this.L, l = n.GeometryUtil;
|
|
1474
|
+
if (!l) return;
|
|
1475
|
+
const s = {
|
|
1476
|
+
km: 2,
|
|
1477
|
+
ha: 2,
|
|
1478
|
+
m: 0,
|
|
1479
|
+
mi: 2,
|
|
1480
|
+
ac: 2,
|
|
1481
|
+
yd: 0,
|
|
1482
|
+
ft: 0,
|
|
1483
|
+
nm: 2
|
|
1484
|
+
}, c = (e = (t = l.formattedNumber) == null ? void 0 : t.bind(l)) != null ? e : ((d, p) => Number(d).toFixed(p));
|
|
1485
|
+
l.readableArea = (d, p, g) => {
|
|
1486
|
+
var A;
|
|
1487
|
+
const h = (A = n.Util) != null && A.extend ? n.Util.extend({}, s, g || {}) : { ...s, ...g || {} };
|
|
1488
|
+
let m;
|
|
1489
|
+
if (p) {
|
|
1490
|
+
let x = ["ha", "m"];
|
|
1491
|
+
const y = typeof p;
|
|
1492
|
+
y === "string" ? x = [p] : y !== "boolean" && (x = Array.isArray(p) ? p : x), d >= 1e6 && x.indexOf("km") !== -1 ? m = `${c(1e-6 * d, h.km)} km²` : d >= 1e4 && x.indexOf("ha") !== -1 ? m = `${c(1e-4 * d, h.ha)} ha` : m = `${c(d, h.m)} m²`;
|
|
1493
|
+
} else
|
|
1494
|
+
d = d / 0.836127, d >= 3097600 ? m = `${c(d / 3097600, h.mi)} mi²` : d >= 4840 ? m = `${c(d / 4840, h.ac)} acres` : m = `${c(d, h.yd)} yd²`;
|
|
1495
|
+
return m;
|
|
1496
|
+
};
|
|
1497
|
+
} catch (n) {
|
|
1498
|
+
this.logger.warn("leaflet-draw-patch:readableArea", n);
|
|
1499
|
+
}
|
|
1500
|
+
try {
|
|
1501
|
+
const n = this.L, l = (o = n.Edit) == null ? void 0 : o.Circle, s = (a = n.Draw) == null ? void 0 : a.Event, c = n.GeometryUtil;
|
|
1502
|
+
if (!((r = l == null ? void 0 : l.prototype) != null && r._resize) || !s || !c) return;
|
|
1503
|
+
l.prototype._resize = function(p) {
|
|
1504
|
+
var m, A, x;
|
|
1505
|
+
const g = this._moveMarker.getLatLng(), h = c.isVersion07x() ? g.distanceTo(p) : this._map.distance(g, p);
|
|
1506
|
+
this._shape.setRadius(h);
|
|
1507
|
+
try {
|
|
1508
|
+
(m = this._map) != null && m.editTooltip && ((x = (A = this._map) == null ? void 0 : A._editTooltip) != null && x.updateContent) && this._map._editTooltip.updateContent({
|
|
1509
|
+
text: n.drawLocal.edit.handlers.edit.tooltip.subtext + "<br />" + n.drawLocal.edit.handlers.edit.tooltip.text,
|
|
1510
|
+
subtext: n.drawLocal.draw.handlers.circle.radius + ": " + c.readableDistance(
|
|
1511
|
+
h,
|
|
1512
|
+
!0,
|
|
1513
|
+
this.options.feet,
|
|
1514
|
+
this.options.nautic
|
|
1515
|
+
)
|
|
1516
|
+
});
|
|
1517
|
+
} catch {
|
|
1518
|
+
}
|
|
1519
|
+
this._map.fire(s.EDITRESIZE, { layer: this._shape });
|
|
1520
|
+
};
|
|
1521
|
+
} catch (n) {
|
|
1522
|
+
this.logger.warn("leaflet-draw-patch:circle-resize", n);
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
bindDrawEvents() {
|
|
1526
|
+
!this.map || !this.drawnItems || (this.map.on(this.L.Draw.Event.CREATED, (t) => {
|
|
1527
|
+
var e, o, a;
|
|
1528
|
+
try {
|
|
1529
|
+
const { layer: r, layerType: n } = t;
|
|
1530
|
+
if (n === D.TYPE) {
|
|
1531
|
+
try {
|
|
1532
|
+
(e = this.activeCakeSession) == null || e.destroy();
|
|
1533
|
+
} catch {
|
|
1534
|
+
}
|
|
1535
|
+
this.activeCakeSession = new We(
|
|
1536
|
+
this.map,
|
|
1537
|
+
r,
|
|
1538
|
+
(d) => {
|
|
1539
|
+
if (!this.drawnItems) return;
|
|
1540
|
+
const p = this.store.add(d), g = this.L.geoJSON(d);
|
|
1541
|
+
let h = 0;
|
|
1542
|
+
g.eachLayer((m) => {
|
|
1543
|
+
var x, y, f;
|
|
1544
|
+
const A = (x = p[h]) != null ? x : p[p.length - 1];
|
|
1545
|
+
m._fid = A, this.drawnItems.addLayer(m), this.installVertexContextMenu(m), (f = (y = this.options.callbacks) == null ? void 0 : y.onCreated) == null || f.call(y, {
|
|
1546
|
+
id: A,
|
|
1547
|
+
layerType: "polygon",
|
|
1548
|
+
geoJSON: m.toGeoJSON()
|
|
1549
|
+
}), h++;
|
|
1550
|
+
}), this.activeCakeSession = null;
|
|
1551
|
+
},
|
|
1552
|
+
this.measurementSystem
|
|
1553
|
+
);
|
|
1554
|
+
return;
|
|
1555
|
+
}
|
|
1556
|
+
this.drawnItems.addLayer(r);
|
|
1557
|
+
const l = r.toGeoJSON(), c = this.store.add({
|
|
1558
|
+
type: "FeatureCollection",
|
|
1559
|
+
features: [l]
|
|
1560
|
+
})[0];
|
|
1561
|
+
r._fid = c, this.installVertexContextMenu(r), (a = (o = this.options.callbacks) == null ? void 0 : o.onCreated) == null || a.call(o, { id: c, layerType: n, geoJSON: l });
|
|
1562
|
+
} catch (r) {
|
|
1563
|
+
this._error("onCreated handler failed", r);
|
|
1564
|
+
}
|
|
1565
|
+
}), this.map.on(this.L.Draw.Event.EDITED, (t) => {
|
|
1566
|
+
var e, o;
|
|
1567
|
+
try {
|
|
1568
|
+
const a = [];
|
|
1569
|
+
t.layers.eachLayer((n) => {
|
|
1570
|
+
const l = n.toGeoJSON(), s = n._fid;
|
|
1571
|
+
if (s)
|
|
1572
|
+
this.store.update(s, l), a.push(s);
|
|
1573
|
+
else {
|
|
1574
|
+
const c = this.store.add({
|
|
1575
|
+
type: "FeatureCollection",
|
|
1576
|
+
features: [l]
|
|
1577
|
+
})[0];
|
|
1578
|
+
n._fid = c, a.push(c);
|
|
1579
|
+
}
|
|
1580
|
+
}), (o = (e = this.options.callbacks) == null ? void 0 : e.onEdited) == null || o.call(e, {
|
|
1581
|
+
ids: a,
|
|
1582
|
+
geoJSON: this.store.toFeatureCollection()
|
|
1583
|
+
});
|
|
1584
|
+
} catch (a) {
|
|
1585
|
+
this._error("onEdited handler failed", a);
|
|
1586
|
+
}
|
|
1587
|
+
}), this.map.on(this.L.Draw.Event.DELETED, (t) => {
|
|
1588
|
+
var e, o;
|
|
1589
|
+
try {
|
|
1590
|
+
const a = [];
|
|
1591
|
+
t.layers.eachLayer((n) => {
|
|
1592
|
+
const l = n._fid;
|
|
1593
|
+
l && (a.push(l), this.store.remove(l));
|
|
1594
|
+
}), (o = (e = this.options.callbacks) == null ? void 0 : e.onDeleted) == null || o.call(e, {
|
|
1595
|
+
ids: a,
|
|
1596
|
+
geoJSON: this.store.toFeatureCollection()
|
|
1597
|
+
});
|
|
1598
|
+
} catch (a) {
|
|
1599
|
+
this._error("onDeleted handler failed", a);
|
|
1600
|
+
}
|
|
1601
|
+
}));
|
|
1602
|
+
}
|
|
1603
|
+
_error(t, e) {
|
|
1604
|
+
var o, a;
|
|
1605
|
+
this.logger.error("error", { message: t, cause: e }), (a = (o = this.options.callbacks) == null ? void 0 : o.onError) == null || a.call(o, { message: t, cause: e });
|
|
1606
|
+
}
|
|
1607
|
+
// -------- Vertex deletion context menu --------
|
|
1608
|
+
installVertexContextMenu(t) {
|
|
1609
|
+
if (!t || typeof t.on != "function") return;
|
|
1610
|
+
const e = (a) => {
|
|
1611
|
+
var r, n, l, s;
|
|
1612
|
+
try {
|
|
1613
|
+
(n = (r = a == null ? void 0 : a.originalEvent) == null ? void 0 : r.preventDefault) == null || n.call(r), (s = (l = a == null ? void 0 : a.originalEvent) == null ? void 0 : l.stopPropagation) == null || s.call(l);
|
|
1614
|
+
} catch {
|
|
1615
|
+
}
|
|
1616
|
+
this.openVertexMenu(t, a);
|
|
1617
|
+
}, o = (a) => {
|
|
1618
|
+
const r = a == null ? void 0 : a.originalEvent;
|
|
1619
|
+
r && (r.ctrlKey || r.metaKey) && this.openVertexMenu(t, a);
|
|
1620
|
+
};
|
|
1621
|
+
try {
|
|
1622
|
+
t.on("contextmenu", e), t.on("click", o);
|
|
1623
|
+
} catch {
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
openVertexMenu(t, e) {
|
|
1627
|
+
try {
|
|
1628
|
+
if (!this.map || !(typeof t.getLatLngs == "function" && (t instanceof this.L.Polygon || t instanceof this.L.Polyline))) return;
|
|
1629
|
+
const a = t.editing;
|
|
1630
|
+
if (!a || typeof a.enabled != "function" || !a.enabled())
|
|
1631
|
+
return;
|
|
1632
|
+
const r = e == null ? void 0 : e.latlng, n = this.map.latLngToContainerPoint(r), l = this.findNearestVertex(t, r, 12);
|
|
1633
|
+
if (!l) return;
|
|
1634
|
+
this.showVertexMenu(n, async () => {
|
|
1635
|
+
await this.deleteVertex(t, l.pathIndex, l.vertexIndex);
|
|
1636
|
+
});
|
|
1637
|
+
} catch (o) {
|
|
1638
|
+
this._error("openVertexMenu", o);
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
showVertexMenu(t, e) {
|
|
1642
|
+
var o;
|
|
1643
|
+
try {
|
|
1644
|
+
try {
|
|
1645
|
+
(o = this.vertexMenuCleanup) == null || o.call(this);
|
|
1646
|
+
} catch {
|
|
1647
|
+
}
|
|
1648
|
+
if (this.vertexMenuCleanup = null, !this.container) return;
|
|
1649
|
+
const a = document.createElement("div");
|
|
1650
|
+
a.style.position = "absolute", a.style.top = `${t.y}px`, a.style.left = `${t.x}px`, a.style.transform = "translate(-50%, -100%)", a.style.background = "#fff", a.style.border = "1px solid rgba(0,0,0,0.15)", a.style.borderRadius = "6px", a.style.boxShadow = "0 4px 12px rgba(0,0,0,0.15)", a.style.padding = "6px", a.style.zIndex = "10000", a.style.fontSize = "12px", a.style.userSelect = "none";
|
|
1651
|
+
const r = document.createElement("button");
|
|
1652
|
+
r.textContent = "Delete vertex", r.style.padding = "6px 10px", r.style.border = "none", r.style.background = "#da1e28", r.style.color = "#fff", r.style.borderRadius = "4px", r.style.cursor = "pointer", r.addEventListener("click", (s) => {
|
|
1653
|
+
s.stopPropagation(), s.preventDefault();
|
|
1654
|
+
try {
|
|
1655
|
+
e();
|
|
1656
|
+
} finally {
|
|
1657
|
+
n();
|
|
1658
|
+
}
|
|
1659
|
+
}), a.appendChild(r);
|
|
1660
|
+
const n = () => {
|
|
1661
|
+
try {
|
|
1662
|
+
window.removeEventListener("pointerdown", l), this.container.removeEventListener("scroll", n, !0), a.remove();
|
|
1663
|
+
} catch {
|
|
1664
|
+
}
|
|
1665
|
+
this.vertexMenuEl = null, this.vertexMenuCleanup = null;
|
|
1666
|
+
}, l = (s) => {
|
|
1667
|
+
a.contains(s.target) || n();
|
|
1668
|
+
};
|
|
1669
|
+
window.addEventListener("pointerdown", l, { capture: !0 }), this.container.addEventListener("scroll", n, !0), this.container.appendChild(a), this.vertexMenuEl = a, this.vertexMenuCleanup = n;
|
|
1670
|
+
} catch (a) {
|
|
1671
|
+
this._error("showVertexMenu", a);
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
findNearestVertex(t, e, o) {
|
|
1675
|
+
if (!this.map) return null;
|
|
1676
|
+
const a = (g) => this.map.latLngToContainerPoint(g), r = (g, h) => Math.hypot(g.x - h.x, g.y - h.y), n = a(e);
|
|
1677
|
+
let l = 1 / 0, s = -1, c = -1;
|
|
1678
|
+
const d = t.getLatLngs();
|
|
1679
|
+
return (Array.isArray(d[0]) ? d : [d]).forEach((g, h) => {
|
|
1680
|
+
g.forEach((m, A) => {
|
|
1681
|
+
const x = a(m), y = r(x, n);
|
|
1682
|
+
y < l && (l = y, s = h, c = A);
|
|
1683
|
+
});
|
|
1684
|
+
}), s === -1 || l > o ? null : { pathIndex: s, vertexIndex: c };
|
|
1685
|
+
}
|
|
1686
|
+
async deleteVertex(t, e, o) {
|
|
1687
|
+
var a, r, n;
|
|
1688
|
+
try {
|
|
1689
|
+
if (!(typeof t.getLatLngs == "function" && (t instanceof this.L.Polygon || t instanceof this.L.Polyline))) return;
|
|
1690
|
+
const s = t.getLatLngs(), c = Array.isArray(s[0]) ? s : [s], d = c[e];
|
|
1691
|
+
if (!d) return;
|
|
1692
|
+
const g = t instanceof this.L.Polygon ? 3 : 2;
|
|
1693
|
+
if (d.length <= g) return;
|
|
1694
|
+
if (d.splice(o, 1), c.length === 1)
|
|
1695
|
+
t.setLatLngs(d);
|
|
1696
|
+
else {
|
|
1697
|
+
const m = c.map((A, x) => x === e ? d : A);
|
|
1698
|
+
t.setLatLngs(m);
|
|
1699
|
+
}
|
|
1700
|
+
(a = t.redraw) == null || a.call(t);
|
|
1701
|
+
const h = t._fid;
|
|
1702
|
+
if (h) {
|
|
1703
|
+
const m = t.toGeoJSON();
|
|
1704
|
+
this.store.update(h, m), (n = (r = this.options.callbacks) == null ? void 0 : r.onEdited) == null || n.call(r, {
|
|
1705
|
+
ids: [h],
|
|
1706
|
+
geoJSON: this.store.toFeatureCollection()
|
|
1707
|
+
});
|
|
1708
|
+
}
|
|
1709
|
+
} catch (l) {
|
|
1710
|
+
this._error("deleteVertex", l);
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
class se extends HTMLElement {
|
|
1715
|
+
constructor() {
|
|
1716
|
+
super();
|
|
1717
|
+
// Shadow DOM and container references
|
|
1718
|
+
u(this, "_root");
|
|
1719
|
+
u(this, "_container");
|
|
1720
|
+
// Logging
|
|
1721
|
+
u(this, "_logger", N("component:leaflet-geokit", "debug"));
|
|
1722
|
+
// Internal state mirrors for attributes/properties
|
|
1723
|
+
u(this, "_latitude", 0);
|
|
1724
|
+
u(this, "_longitude", 0);
|
|
1725
|
+
u(this, "_zoom", 2);
|
|
1726
|
+
u(this, "_minZoom");
|
|
1727
|
+
u(this, "_maxZoom");
|
|
1728
|
+
u(this, "_tileUrl", "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png");
|
|
1729
|
+
u(this, "_tileAttribution");
|
|
1730
|
+
u(this, "_readOnly", !1);
|
|
1731
|
+
u(this, "_logLevel", "debug");
|
|
1732
|
+
u(this, "_devOverlay", !1);
|
|
1733
|
+
u(this, "_polygonAllowIntersection", !1);
|
|
1734
|
+
u(this, "_preferCanvas", !0);
|
|
1735
|
+
// Default to Canvas for performance
|
|
1736
|
+
// Theming
|
|
1737
|
+
u(this, "_themeUrl");
|
|
1738
|
+
u(this, "_themeCss", "");
|
|
1739
|
+
u(this, "_themeLinkEl", null);
|
|
1740
|
+
u(this, "_themeStyleEl", null);
|
|
1741
|
+
// Controller
|
|
1742
|
+
u(this, "_controller", null);
|
|
1743
|
+
// External Leaflet configuration
|
|
1744
|
+
u(this, "_useExternalLeaflet", !1);
|
|
1745
|
+
u(this, "_skipLeafletStyles", !1);
|
|
1746
|
+
u(this, "_leafletInstance");
|
|
1747
|
+
this._root = this.attachShadow({ mode: "open" }), this._root.innerHTML = `
|
|
1748
|
+
<style>
|
|
1749
|
+
:host {
|
|
1750
|
+
display: block;
|
|
1751
|
+
contain: content;
|
|
1752
|
+
}
|
|
1753
|
+
.map-container {
|
|
1754
|
+
width: 100%;
|
|
1755
|
+
height: 100%;
|
|
1756
|
+
position: relative;
|
|
1757
|
+
}
|
|
1758
|
+
</style>
|
|
1759
|
+
<div class="map-container" part="map"></div>
|
|
1760
|
+
`;
|
|
1761
|
+
const e = this._root.querySelector(".map-container");
|
|
1762
|
+
if (!(e instanceof HTMLDivElement))
|
|
1763
|
+
throw new Error("Failed to initialize map container");
|
|
1764
|
+
this._container = e;
|
|
1765
|
+
const o = this.getAttribute("log-level");
|
|
1766
|
+
o && (this._logLevel = o, this._logger.setLevel(o));
|
|
1767
|
+
}
|
|
1768
|
+
// Build DrawControlsConfig from boolean attributes
|
|
1769
|
+
_controlsFromAttributes() {
|
|
1770
|
+
return {
|
|
1771
|
+
polygon: this.hasAttribute("draw-polygon"),
|
|
1772
|
+
polyline: this.hasAttribute("draw-polyline"),
|
|
1773
|
+
rectangle: this.hasAttribute("draw-rectangle"),
|
|
1774
|
+
circle: this.hasAttribute("draw-circle"),
|
|
1775
|
+
cake: this.hasAttribute("draw-layer-cake"),
|
|
1776
|
+
marker: this.hasAttribute("draw-marker"),
|
|
1777
|
+
edit: this.hasAttribute("edit-features"),
|
|
1778
|
+
delete: this.hasAttribute("delete-features"),
|
|
1779
|
+
ruler: this.hasAttribute("draw-ruler")
|
|
1780
|
+
};
|
|
1781
|
+
}
|
|
1782
|
+
_mapConfig() {
|
|
1783
|
+
return {
|
|
1784
|
+
latitude: this._latitude,
|
|
1785
|
+
longitude: this._longitude,
|
|
1786
|
+
zoom: this._zoom,
|
|
1787
|
+
minZoom: this._minZoom,
|
|
1788
|
+
maxZoom: this._maxZoom,
|
|
1789
|
+
tileUrl: this._tileUrl,
|
|
1790
|
+
tileAttribution: this._tileAttribution,
|
|
1791
|
+
readOnly: this._readOnly,
|
|
1792
|
+
fitToDataOnLoad: !1,
|
|
1793
|
+
logLevel: this._logLevel,
|
|
1794
|
+
devOverlay: this._devOverlay,
|
|
1795
|
+
polygonAllowIntersection: this._polygonAllowIntersection,
|
|
1796
|
+
preferCanvas: this._preferCanvas,
|
|
1797
|
+
useExternalLeaflet: this._useExternalLeaflet,
|
|
1798
|
+
skipLeafletStyles: this._skipLeafletStyles
|
|
1799
|
+
};
|
|
1800
|
+
}
|
|
1801
|
+
// Lifecycle
|
|
1802
|
+
async connectedCallback() {
|
|
1803
|
+
var e;
|
|
1804
|
+
this._logger.debug("connectedCallback", this._currentConfig()), Ie({
|
|
1805
|
+
root: this._root,
|
|
1806
|
+
skipStyles: this._skipLeafletStyles
|
|
1807
|
+
}), this._applyThemeStyles(), this._controller = new dt({
|
|
1808
|
+
container: this._container,
|
|
1809
|
+
map: this._mapConfig(),
|
|
1810
|
+
controls: this._controlsFromAttributes(),
|
|
1811
|
+
readOnly: this._readOnly,
|
|
1812
|
+
logger: this._logger.child("controller"),
|
|
1813
|
+
callbacks: {
|
|
1814
|
+
onReady: (o) => {
|
|
1815
|
+
this.dispatchEvent(new CustomEvent("leaflet-draw:ready", { detail: o }));
|
|
1816
|
+
},
|
|
1817
|
+
onCreated: (o) => {
|
|
1818
|
+
this.dispatchEvent(
|
|
1819
|
+
new CustomEvent("leaflet-draw:created", { detail: o })
|
|
1820
|
+
);
|
|
1821
|
+
},
|
|
1822
|
+
onEdited: (o) => {
|
|
1823
|
+
this.dispatchEvent(
|
|
1824
|
+
new CustomEvent("leaflet-draw:edited", { detail: o })
|
|
1825
|
+
);
|
|
1826
|
+
},
|
|
1827
|
+
onDeleted: (o) => {
|
|
1828
|
+
this.dispatchEvent(
|
|
1829
|
+
new CustomEvent("leaflet-draw:deleted", { detail: o })
|
|
1830
|
+
);
|
|
1831
|
+
},
|
|
1832
|
+
onError: (o) => {
|
|
1833
|
+
this.dispatchEvent(new CustomEvent("leaflet-draw:error", { detail: o }));
|
|
1834
|
+
}
|
|
1835
|
+
},
|
|
1836
|
+
leaflet: (e = this._leafletInstance) != null ? e : void 0,
|
|
1837
|
+
useExternalLeaflet: this._useExternalLeaflet
|
|
1838
|
+
}), await this._controller.init();
|
|
1839
|
+
}
|
|
1840
|
+
async disconnectedCallback() {
|
|
1841
|
+
this._logger.debug("disconnectedCallback"), this._controller && (await this._controller.destroy(), this._controller = null);
|
|
1842
|
+
}
|
|
1843
|
+
// Observed attributes and reflection
|
|
1844
|
+
static get observedAttributes() {
|
|
1845
|
+
return [
|
|
1846
|
+
"latitude",
|
|
1847
|
+
"longitude",
|
|
1848
|
+
"zoom",
|
|
1849
|
+
"min-zoom",
|
|
1850
|
+
"max-zoom",
|
|
1851
|
+
"tile-url",
|
|
1852
|
+
"tile-attribution",
|
|
1853
|
+
"read-only",
|
|
1854
|
+
"log-level",
|
|
1855
|
+
"dev-overlay",
|
|
1856
|
+
"prefer-canvas",
|
|
1857
|
+
"use-external-leaflet",
|
|
1858
|
+
"skip-leaflet-styles",
|
|
1859
|
+
"theme-url",
|
|
1860
|
+
// draw controls
|
|
1861
|
+
"draw-polygon",
|
|
1862
|
+
"draw-polyline",
|
|
1863
|
+
"draw-rectangle",
|
|
1864
|
+
"draw-circle",
|
|
1865
|
+
"draw-layer-cake",
|
|
1866
|
+
"draw-marker",
|
|
1867
|
+
"draw-ruler",
|
|
1868
|
+
"edit-features",
|
|
1869
|
+
"delete-features",
|
|
1870
|
+
"polygon-allow-intersection"
|
|
1871
|
+
];
|
|
1872
|
+
}
|
|
1873
|
+
attributeChangedCallback(e, o, a) {
|
|
1874
|
+
switch (this._logger.debug("attributeChanged", { name: e, value: a }), e) {
|
|
1875
|
+
case "latitude":
|
|
1876
|
+
this._latitude = this._coerceNumber(a, 0);
|
|
1877
|
+
break;
|
|
1878
|
+
case "longitude":
|
|
1879
|
+
this._longitude = this._coerceNumber(a, 0);
|
|
1880
|
+
break;
|
|
1881
|
+
case "zoom":
|
|
1882
|
+
this._zoom = this._coerceNumber(a, 2);
|
|
1883
|
+
break;
|
|
1884
|
+
case "min-zoom":
|
|
1885
|
+
this._minZoom = a != null ? this._coerceNumber(a) : void 0;
|
|
1886
|
+
break;
|
|
1887
|
+
case "max-zoom":
|
|
1888
|
+
this._maxZoom = a != null ? this._coerceNumber(a) : void 0;
|
|
1889
|
+
break;
|
|
1890
|
+
case "tile-url":
|
|
1891
|
+
this._tileUrl = a != null ? a : this._tileUrl;
|
|
1892
|
+
break;
|
|
1893
|
+
case "tile-attribution":
|
|
1894
|
+
this._tileAttribution = a != null ? a : void 0;
|
|
1895
|
+
break;
|
|
1896
|
+
case "theme-url":
|
|
1897
|
+
this._themeUrl = a != null ? a : void 0, this.isConnected && this._applyThemeStyles();
|
|
1898
|
+
break;
|
|
1899
|
+
case "read-only":
|
|
1900
|
+
this._readOnly = a !== null;
|
|
1901
|
+
break;
|
|
1902
|
+
case "log-level":
|
|
1903
|
+
this._logLevel = a != null ? a : this._logLevel, this._logger.setLevel(this._logLevel);
|
|
1904
|
+
break;
|
|
1905
|
+
case "dev-overlay":
|
|
1906
|
+
this._devOverlay = a !== null;
|
|
1907
|
+
break;
|
|
1908
|
+
case "polygon-allow-intersection":
|
|
1909
|
+
this._polygonAllowIntersection = a !== null;
|
|
1910
|
+
break;
|
|
1911
|
+
case "prefer-canvas":
|
|
1912
|
+
this._preferCanvas = a !== null;
|
|
1913
|
+
break;
|
|
1914
|
+
case "use-external-leaflet":
|
|
1915
|
+
this._useExternalLeaflet = a !== null;
|
|
1916
|
+
break;
|
|
1917
|
+
case "skip-leaflet-styles":
|
|
1918
|
+
this._skipLeafletStyles = a !== null;
|
|
1919
|
+
break;
|
|
1920
|
+
}
|
|
1921
|
+
this._controller && (e === "latitude" || e === "longitude" || e === "zoom" ? this._controller.setView(
|
|
1922
|
+
this._latitude,
|
|
1923
|
+
this._longitude,
|
|
1924
|
+
this._zoom
|
|
1925
|
+
) : (e === "tile-url" || e === "tile-attribution" || e === "min-zoom" || e === "max-zoom" || e === "read-only" || e === "dev-overlay" || e === "log-level" || e === "prefer-canvas" || e === "use-external-leaflet" || e === "skip-leaflet-styles" || e.startsWith("draw-") || e === "edit-features" || e === "delete-features") && this._controller.destroy().then(() => this._controller.init()));
|
|
1926
|
+
}
|
|
1927
|
+
// Properties (reflect attributes)
|
|
1928
|
+
get latitude() {
|
|
1929
|
+
return this._latitude;
|
|
1930
|
+
}
|
|
1931
|
+
set latitude(e) {
|
|
1932
|
+
this._latitude = Number(e), this._reflect("latitude", String(this._latitude));
|
|
1933
|
+
}
|
|
1934
|
+
get longitude() {
|
|
1935
|
+
return this._longitude;
|
|
1936
|
+
}
|
|
1937
|
+
set longitude(e) {
|
|
1938
|
+
this._longitude = Number(e), this._reflect("longitude", String(this._longitude));
|
|
1939
|
+
}
|
|
1940
|
+
get zoom() {
|
|
1941
|
+
return this._zoom;
|
|
1942
|
+
}
|
|
1943
|
+
set zoom(e) {
|
|
1944
|
+
this._zoom = Number(e), this._reflect("zoom", String(this._zoom));
|
|
1945
|
+
}
|
|
1946
|
+
get minZoom() {
|
|
1947
|
+
return this._minZoom;
|
|
1948
|
+
}
|
|
1949
|
+
set minZoom(e) {
|
|
1950
|
+
this._minZoom = e, this._reflect("min-zoom", e != null ? String(e) : null);
|
|
1951
|
+
}
|
|
1952
|
+
get maxZoom() {
|
|
1953
|
+
return this._maxZoom;
|
|
1954
|
+
}
|
|
1955
|
+
set maxZoom(e) {
|
|
1956
|
+
this._maxZoom = e, this._reflect("max-zoom", e != null ? String(e) : null);
|
|
1957
|
+
}
|
|
1958
|
+
get tileUrl() {
|
|
1959
|
+
return this._tileUrl;
|
|
1960
|
+
}
|
|
1961
|
+
set tileUrl(e) {
|
|
1962
|
+
this._tileUrl = e, this._reflect("tile-url", e);
|
|
1963
|
+
}
|
|
1964
|
+
get tileAttribution() {
|
|
1965
|
+
return this._tileAttribution;
|
|
1966
|
+
}
|
|
1967
|
+
set tileAttribution(e) {
|
|
1968
|
+
this._tileAttribution = e, this._reflect("tile-attribution", e != null ? e : null);
|
|
1969
|
+
}
|
|
1970
|
+
get readOnly() {
|
|
1971
|
+
return this._readOnly;
|
|
1972
|
+
}
|
|
1973
|
+
set readOnly(e) {
|
|
1974
|
+
this._readOnly = !!e, this._booleanReflect("read-only", this._readOnly);
|
|
1975
|
+
}
|
|
1976
|
+
get logLevel() {
|
|
1977
|
+
return this._logLevel;
|
|
1978
|
+
}
|
|
1979
|
+
set logLevel(e) {
|
|
1980
|
+
this._logLevel = e, this._logger.setLevel(e), this._reflect("log-level", e);
|
|
1981
|
+
}
|
|
1982
|
+
get devOverlay() {
|
|
1983
|
+
return this._devOverlay;
|
|
1984
|
+
}
|
|
1985
|
+
set devOverlay(e) {
|
|
1986
|
+
this._devOverlay = !!e, this._booleanReflect("dev-overlay", this._devOverlay);
|
|
1987
|
+
}
|
|
1988
|
+
get preferCanvas() {
|
|
1989
|
+
return this._preferCanvas;
|
|
1990
|
+
}
|
|
1991
|
+
set preferCanvas(e) {
|
|
1992
|
+
this._preferCanvas = !!e, this._booleanReflect("prefer-canvas", this._preferCanvas);
|
|
1993
|
+
}
|
|
1994
|
+
get useExternalLeaflet() {
|
|
1995
|
+
return this._useExternalLeaflet;
|
|
1996
|
+
}
|
|
1997
|
+
set useExternalLeaflet(e) {
|
|
1998
|
+
this._useExternalLeaflet = !!e, this._booleanReflect("use-external-leaflet", this._useExternalLeaflet);
|
|
1999
|
+
}
|
|
2000
|
+
get skipLeafletStyles() {
|
|
2001
|
+
return this._skipLeafletStyles;
|
|
2002
|
+
}
|
|
2003
|
+
set skipLeafletStyles(e) {
|
|
2004
|
+
this._skipLeafletStyles = !!e, this._booleanReflect("skip-leaflet-styles", this._skipLeafletStyles);
|
|
2005
|
+
}
|
|
2006
|
+
get leafletInstance() {
|
|
2007
|
+
return this._leafletInstance;
|
|
2008
|
+
}
|
|
2009
|
+
set leafletInstance(e) {
|
|
2010
|
+
this._leafletInstance = e;
|
|
2011
|
+
}
|
|
2012
|
+
get themeCss() {
|
|
2013
|
+
return this._themeCss;
|
|
2014
|
+
}
|
|
2015
|
+
set themeCss(e) {
|
|
2016
|
+
this._themeCss = typeof e == "string" ? e : "", this.isConnected && this._applyThemeStyles();
|
|
2017
|
+
}
|
|
2018
|
+
// Public API methods (delegating to controller)
|
|
2019
|
+
async getGeoJSON() {
|
|
2020
|
+
return this._logger.debug("getGeoJSON"), this._controller ? this._controller.getGeoJSON() : { type: "FeatureCollection", features: [] };
|
|
2021
|
+
}
|
|
2022
|
+
async loadGeoJSON(e) {
|
|
2023
|
+
var r, n;
|
|
2024
|
+
if (this._logger.debug("loadGeoJSON", { features: (n = (r = e == null ? void 0 : e.features) == null ? void 0 : r.length) != null ? n : 0 }), !this._controller) return;
|
|
2025
|
+
const o = { fc: e, mode: "load" };
|
|
2026
|
+
this.dispatchEvent(new CustomEvent("leaflet-draw:ingest", { detail: o }));
|
|
2027
|
+
const a = o.fc && o.fc.type === "FeatureCollection" ? o.fc : e;
|
|
2028
|
+
await this._controller.loadGeoJSON(a, !1);
|
|
2029
|
+
}
|
|
2030
|
+
async clearLayers() {
|
|
2031
|
+
this._logger.debug("clearLayers"), this._controller && await this._controller.clearLayers();
|
|
2032
|
+
}
|
|
2033
|
+
async addFeatures(e) {
|
|
2034
|
+
var r, n;
|
|
2035
|
+
if (this._logger.debug("addFeatures", { count: (n = (r = e == null ? void 0 : e.features) == null ? void 0 : r.length) != null ? n : 0 }), !this._controller) return [];
|
|
2036
|
+
const o = { fc: e, mode: "add" };
|
|
2037
|
+
this.dispatchEvent(new CustomEvent("leaflet-draw:ingest", { detail: o }));
|
|
2038
|
+
const a = o.fc && o.fc.type === "FeatureCollection" ? o.fc : e;
|
|
2039
|
+
return this._controller.addFeatures(a);
|
|
2040
|
+
}
|
|
2041
|
+
async updateFeature(e, o) {
|
|
2042
|
+
this._logger.debug("updateFeature", { id: e }), this._controller && await this._controller.updateFeature(e, o);
|
|
2043
|
+
}
|
|
2044
|
+
async removeFeature(e) {
|
|
2045
|
+
this._logger.debug("removeFeature", { id: e }), this._controller && await this._controller.removeFeature(e);
|
|
2046
|
+
}
|
|
2047
|
+
async fitBoundsToData(e) {
|
|
2048
|
+
this._logger.debug("fitBoundsToData", { padding: e }), this._controller && await this._controller.fitBoundsToData(
|
|
2049
|
+
typeof e == "number" ? e : 0.05
|
|
2050
|
+
);
|
|
2051
|
+
}
|
|
2052
|
+
async fitBounds(e, o) {
|
|
2053
|
+
this._logger.debug("fitBounds", { bounds: e, padding: o }), this._controller && await this._controller.fitBounds(
|
|
2054
|
+
e,
|
|
2055
|
+
typeof o == "number" ? o : 0.05
|
|
2056
|
+
);
|
|
2057
|
+
}
|
|
2058
|
+
async setView(e, o, a) {
|
|
2059
|
+
this._logger.debug("setView", { lat: e, lng: o, zoom: a }), this.latitude = e, this.longitude = o, typeof a == "number" && (this.zoom = a), this._controller && await this._controller.setView(e, o, a);
|
|
2060
|
+
}
|
|
2061
|
+
async exportGeoJSON() {
|
|
2062
|
+
if (this._logger.debug("exportGeoJSON"), !this._controller) return { type: "FeatureCollection", features: [] };
|
|
2063
|
+
const e = await this._controller.getGeoJSON(), o = { geoJSON: e, featureCount: e.features.length };
|
|
2064
|
+
return this.dispatchEvent(new CustomEvent("leaflet-draw:export", { detail: o })), e;
|
|
2065
|
+
}
|
|
2066
|
+
/**
|
|
2067
|
+
* Merge all visible polygon layers into a single polygon.
|
|
2068
|
+
* This removes the original polygon features and adds a new merged feature.
|
|
2069
|
+
*
|
|
2070
|
+
* @param options Optional configuration for the merge operation
|
|
2071
|
+
* @returns Promise resolving to the ID of the newly created merged feature, or null if no polygons to merge
|
|
2072
|
+
*/
|
|
2073
|
+
async mergePolygons(e) {
|
|
2074
|
+
if (this._logger.debug("mergePolygons"), !this._controller) return null;
|
|
2075
|
+
const a = (await this._controller.getGeoJSON()).features.length, r = await this._controller.mergeVisiblePolygons(e);
|
|
2076
|
+
if (r) {
|
|
2077
|
+
const n = await this._controller.getGeoJSON(), l = {
|
|
2078
|
+
id: r,
|
|
2079
|
+
mergedFeatureCount: a - n.features.length + 1,
|
|
2080
|
+
geoJSON: n
|
|
2081
|
+
};
|
|
2082
|
+
this.dispatchEvent(new CustomEvent("leaflet-draw:merged", { detail: l }));
|
|
2083
|
+
}
|
|
2084
|
+
return r;
|
|
2085
|
+
}
|
|
2086
|
+
async setMeasurementUnits(e) {
|
|
2087
|
+
this._logger.debug("setMeasurementUnits", { system: e }), this._controller && this._controller.setRulerUnits(e);
|
|
2088
|
+
}
|
|
2089
|
+
async loadGeoJSONFromUrl(e) {
|
|
2090
|
+
if (this._logger.debug("loadGeoJSONFromUrl", { url: e }), !this._controller) return;
|
|
2091
|
+
const o = await fetch(e, { headers: { Accept: "application/json" } });
|
|
2092
|
+
if (!o.ok) {
|
|
2093
|
+
const l = new Error(
|
|
2094
|
+
`Failed to fetch GeoJSON from ${e}: ${o.status} ${o.statusText}`
|
|
2095
|
+
);
|
|
2096
|
+
throw this.dispatchEvent(
|
|
2097
|
+
new CustomEvent("leaflet-draw:error", {
|
|
2098
|
+
detail: { message: l.message, cause: l }
|
|
2099
|
+
})
|
|
2100
|
+
), l;
|
|
2101
|
+
}
|
|
2102
|
+
const a = await o.json(), r = { fc: a, mode: "load" };
|
|
2103
|
+
this.dispatchEvent(new CustomEvent("leaflet-draw:ingest", { detail: r }));
|
|
2104
|
+
const n = r.fc && r.fc.type === "FeatureCollection" ? r.fc : a;
|
|
2105
|
+
await this._controller.loadGeoJSON(n, !0);
|
|
2106
|
+
}
|
|
2107
|
+
async loadGeoJSONFromText(e) {
|
|
2108
|
+
var n;
|
|
2109
|
+
if (this._logger.debug("loadGeoJSONFromText", { length: (n = e == null ? void 0 : e.length) != null ? n : 0 }), !this._controller) return;
|
|
2110
|
+
let o;
|
|
2111
|
+
try {
|
|
2112
|
+
o = JSON.parse(e);
|
|
2113
|
+
} catch (l) {
|
|
2114
|
+
const s = new Error("Failed to parse GeoJSON text");
|
|
2115
|
+
throw this.dispatchEvent(
|
|
2116
|
+
new CustomEvent("leaflet-draw:error", {
|
|
2117
|
+
detail: { message: s.message, cause: l }
|
|
2118
|
+
})
|
|
2119
|
+
), s;
|
|
2120
|
+
}
|
|
2121
|
+
const a = { fc: o, mode: "load" };
|
|
2122
|
+
this.dispatchEvent(new CustomEvent("leaflet-draw:ingest", { detail: a }));
|
|
2123
|
+
const r = a.fc && a.fc.type === "FeatureCollection" ? a.fc : o;
|
|
2124
|
+
await this._controller.loadGeoJSON(r, !0);
|
|
2125
|
+
}
|
|
2126
|
+
// Helpers
|
|
2127
|
+
_currentConfig() {
|
|
2128
|
+
return {
|
|
2129
|
+
latitude: this._latitude,
|
|
2130
|
+
longitude: this._longitude,
|
|
2131
|
+
zoom: this._zoom,
|
|
2132
|
+
minZoom: this._minZoom,
|
|
2133
|
+
maxZoom: this._maxZoom,
|
|
2134
|
+
tileUrl: this._tileUrl,
|
|
2135
|
+
tileAttribution: this._tileAttribution,
|
|
2136
|
+
readOnly: this._readOnly,
|
|
2137
|
+
fitToDataOnLoad: !1,
|
|
2138
|
+
logLevel: this._logLevel,
|
|
2139
|
+
devOverlay: this._devOverlay,
|
|
2140
|
+
polygonAllowIntersection: this._polygonAllowIntersection,
|
|
2141
|
+
preferCanvas: this._preferCanvas,
|
|
2142
|
+
useExternalLeaflet: this._useExternalLeaflet,
|
|
2143
|
+
skipLeafletStyles: this._skipLeafletStyles
|
|
2144
|
+
};
|
|
2145
|
+
}
|
|
2146
|
+
_applyThemeStyles() {
|
|
2147
|
+
var a;
|
|
2148
|
+
const e = (a = this._themeUrl) == null ? void 0 : a.trim();
|
|
2149
|
+
if (e) {
|
|
2150
|
+
if (!this._themeLinkEl) {
|
|
2151
|
+
const r = document.createElement("link");
|
|
2152
|
+
r.setAttribute("rel", "stylesheet"), r.setAttribute("data-geokit-theme-url", "true"), this._root.appendChild(r), this._themeLinkEl = r;
|
|
2153
|
+
}
|
|
2154
|
+
this._themeLinkEl.getAttribute("href") !== e && this._themeLinkEl.setAttribute("href", e);
|
|
2155
|
+
} else this._themeLinkEl && (this._themeLinkEl.remove(), this._themeLinkEl = null);
|
|
2156
|
+
const o = this._themeCss;
|
|
2157
|
+
if (o.trim().length > 0) {
|
|
2158
|
+
if (!this._themeStyleEl) {
|
|
2159
|
+
const r = document.createElement("style");
|
|
2160
|
+
r.setAttribute("data-geokit-theme-css", "true"), this._root.appendChild(r), this._themeStyleEl = r;
|
|
2161
|
+
}
|
|
2162
|
+
this._themeStyleEl.textContent !== o && (this._themeStyleEl.textContent = o);
|
|
2163
|
+
} else this._themeStyleEl && (this._themeStyleEl.remove(), this._themeStyleEl = null);
|
|
2164
|
+
}
|
|
2165
|
+
_reflect(e, o) {
|
|
2166
|
+
o === null ? this.removeAttribute(e) : this.getAttribute(e) !== o && this.setAttribute(e, o);
|
|
2167
|
+
}
|
|
2168
|
+
_booleanReflect(e, o) {
|
|
2169
|
+
o ? this.hasAttribute(e) || this.setAttribute(e, "") : this.hasAttribute(e) && this.removeAttribute(e);
|
|
2170
|
+
}
|
|
2171
|
+
_coerceNumber(e, o) {
|
|
2172
|
+
if (e == null) return o != null ? o : NaN;
|
|
2173
|
+
const a = Number(e);
|
|
2174
|
+
return Number.isFinite(a) ? a : o != null ? o : NaN;
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
const oe = "leaflet-geokit";
|
|
2178
|
+
customElements.get(oe) || customElements.define(oe, se);
|
|
2179
|
+
const ae = "leaflet-draw-map";
|
|
2180
|
+
if (!customElements.get(ae)) {
|
|
2181
|
+
class i extends se {
|
|
2182
|
+
}
|
|
2183
|
+
customElements.define(ae, i);
|
|
2184
|
+
}
|
|
2185
|
+
export {
|
|
2186
|
+
se as LeafletDrawMapElement
|
|
2187
|
+
};
|
|
2188
|
+
//# sourceMappingURL=index-BM2U4rKn.js.map
|