@nextgis/leaflet-map-adapter 4.0.0-alpha.0 → 4.0.0-alpha.2
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/lib/leaflet-map-adapter.esm-browser.js +215 -158
- package/lib/leaflet-map-adapter.esm-browser.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-browser.prod.js +1 -1
- package/lib/leaflet-map-adapter.esm-browser.prod.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.js +48 -38
- package/lib/leaflet-map-adapter.esm-bundler.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.prod.js +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.prod.js.map +1 -1
- package/lib/leaflet-map-adapter.global.js +215 -158
- package/lib/leaflet-map-adapter.global.js.map +1 -1
- package/lib/leaflet-map-adapter.global.prod.js +1 -1
- package/lib/leaflet-map-adapter.global.prod.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/leaflet-map-adapter; version: 4.0.0-alpha.
|
|
1
|
+
/** Bundle of @nextgis/leaflet-map-adapter; version: 4.0.0-alpha.2; author: NextGIS */
|
|
2
2
|
var LeafletMapAdapter = (function () {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -16,21 +16,21 @@ var LeafletMapAdapter = (function () {
|
|
|
16
16
|
return el;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
var __defProp$
|
|
19
|
+
var __defProp$h = Object.defineProperty;
|
|
20
20
|
var __defProps$8 = Object.defineProperties;
|
|
21
21
|
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
22
|
-
var __getOwnPropSymbols$
|
|
23
|
-
var __hasOwnProp$
|
|
24
|
-
var __propIsEnum$
|
|
25
|
-
var __defNormalProp$
|
|
26
|
-
var __spreadValues$
|
|
22
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
23
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
24
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
25
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
26
|
+
var __spreadValues$c = (a, b) => {
|
|
27
27
|
for (var prop in b || (b = {}))
|
|
28
|
-
if (__hasOwnProp$
|
|
29
|
-
__defNormalProp$
|
|
30
|
-
if (__getOwnPropSymbols$
|
|
31
|
-
for (var prop of __getOwnPropSymbols$
|
|
32
|
-
if (__propIsEnum$
|
|
33
|
-
__defNormalProp$
|
|
28
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
29
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
30
|
+
if (__getOwnPropSymbols$c)
|
|
31
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
32
|
+
if (__propIsEnum$c.call(b, prop))
|
|
33
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
34
34
|
}
|
|
35
35
|
return a;
|
|
36
36
|
};
|
|
@@ -38,7 +38,7 @@ var LeafletMapAdapter = (function () {
|
|
|
38
38
|
const controlOptions = /* @__PURE__ */ new WeakMap();
|
|
39
39
|
function resolveControlOptions(options = {}) {
|
|
40
40
|
var _a;
|
|
41
|
-
return __spreadProps$8(__spreadValues$
|
|
41
|
+
return __spreadProps$8(__spreadValues$c({}, options), {
|
|
42
42
|
margin: (_a = options.margin) != null ? _a : options.bar
|
|
43
43
|
});
|
|
44
44
|
}
|
|
@@ -49,9 +49,9 @@ var LeafletMapAdapter = (function () {
|
|
|
49
49
|
return control ? controlOptions.get(control) : void 0;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
var __defProp$
|
|
53
|
-
var __defNormalProp$
|
|
54
|
-
var __publicField$a = (obj, key, value) => __defNormalProp$
|
|
52
|
+
var __defProp$g = Object.defineProperty;
|
|
53
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
54
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
55
55
|
class ControlContainer {
|
|
56
56
|
constructor(opt = {}) {
|
|
57
57
|
__publicField$a(this, "classPrefix", "webmap");
|
|
@@ -14673,21 +14673,21 @@ var LeafletMapAdapter = (function () {
|
|
|
14673
14673
|
|
|
14674
14674
|
var leafletSrcExports = /*@__PURE__*/ requireLeafletSrc();
|
|
14675
14675
|
|
|
14676
|
-
var __defProp$
|
|
14676
|
+
var __defProp$f = Object.defineProperty;
|
|
14677
14677
|
var __defProps$7 = Object.defineProperties;
|
|
14678
14678
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
14679
|
-
var __getOwnPropSymbols$
|
|
14680
|
-
var __hasOwnProp$
|
|
14681
|
-
var __propIsEnum$
|
|
14682
|
-
var __defNormalProp$
|
|
14683
|
-
var __spreadValues$
|
|
14679
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
14680
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
14681
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
14682
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14683
|
+
var __spreadValues$b = (a, b) => {
|
|
14684
14684
|
for (var prop in b || (b = {}))
|
|
14685
|
-
if (__hasOwnProp$
|
|
14686
|
-
__defNormalProp$
|
|
14687
|
-
if (__getOwnPropSymbols$
|
|
14688
|
-
for (var prop of __getOwnPropSymbols$
|
|
14689
|
-
if (__propIsEnum$
|
|
14690
|
-
__defNormalProp$
|
|
14685
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
14686
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
14687
|
+
if (__getOwnPropSymbols$b)
|
|
14688
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
14689
|
+
if (__propIsEnum$b.call(b, prop))
|
|
14690
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
14691
14691
|
}
|
|
14692
14692
|
return a;
|
|
14693
14693
|
};
|
|
@@ -14703,7 +14703,7 @@ var LeafletMapAdapter = (function () {
|
|
|
14703
14703
|
].filter(Boolean).join(" ");
|
|
14704
14704
|
const element = createControlElement(
|
|
14705
14705
|
control,
|
|
14706
|
-
__spreadProps$7(__spreadValues$
|
|
14706
|
+
__spreadProps$7(__spreadValues$b({}, resolvedOptions), { addClass }),
|
|
14707
14707
|
map != null ? map : leafletMap
|
|
14708
14708
|
);
|
|
14709
14709
|
if (!resolvedOptions.margin) {
|
|
@@ -14750,26 +14750,26 @@ var LeafletMapAdapter = (function () {
|
|
|
14750
14750
|
return control;
|
|
14751
14751
|
}
|
|
14752
14752
|
|
|
14753
|
-
var __defProp$
|
|
14753
|
+
var __defProp$e = Object.defineProperty;
|
|
14754
14754
|
var __defProps$6 = Object.defineProperties;
|
|
14755
14755
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
14756
|
-
var __getOwnPropSymbols$
|
|
14757
|
-
var __hasOwnProp$
|
|
14758
|
-
var __propIsEnum$
|
|
14759
|
-
var __defNormalProp$
|
|
14760
|
-
var __spreadValues$
|
|
14756
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
14757
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
14758
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
14759
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14760
|
+
var __spreadValues$a = (a, b) => {
|
|
14761
14761
|
for (var prop in b || (b = {}))
|
|
14762
|
-
if (__hasOwnProp$
|
|
14763
|
-
__defNormalProp$
|
|
14764
|
-
if (__getOwnPropSymbols$
|
|
14765
|
-
for (var prop of __getOwnPropSymbols$
|
|
14766
|
-
if (__propIsEnum$
|
|
14767
|
-
__defNormalProp$
|
|
14762
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
14763
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
14764
|
+
if (__getOwnPropSymbols$a)
|
|
14765
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
14766
|
+
if (__propIsEnum$a.call(b, prop))
|
|
14767
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
14768
14768
|
}
|
|
14769
14769
|
return a;
|
|
14770
14770
|
};
|
|
14771
14771
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
14772
|
-
var __publicField$9 = (obj, key, value) => __defNormalProp$
|
|
14772
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14773
14773
|
class LeafletControlContainer {
|
|
14774
14774
|
constructor(map, options = {}) {
|
|
14775
14775
|
__publicField$9(this, "map");
|
|
@@ -14837,7 +14837,7 @@ var LeafletMapAdapter = (function () {
|
|
|
14837
14837
|
const mapAny = this.map;
|
|
14838
14838
|
const controlCorners = mapAny._controlCorners || {};
|
|
14839
14839
|
const getCorner = (key, selector) => controlCorners[key] || this.map.getContainer().querySelector(selector) || void 0;
|
|
14840
|
-
return new ControlContainer(__spreadProps$6(__spreadValues$
|
|
14840
|
+
return new ControlContainer(__spreadProps$6(__spreadValues$a({}, options), {
|
|
14841
14841
|
map: this.map,
|
|
14842
14842
|
container: mapAny._controlContainer,
|
|
14843
14843
|
positionContainers: {
|
|
@@ -15488,9 +15488,9 @@ var LeafletMapAdapter = (function () {
|
|
|
15488
15488
|
};
|
|
15489
15489
|
}
|
|
15490
15490
|
|
|
15491
|
-
var __defProp$
|
|
15492
|
-
var __defNormalProp$
|
|
15493
|
-
var __publicField$8 = (obj, key, value) => __defNormalProp$
|
|
15491
|
+
var __defProp$d = Object.defineProperty;
|
|
15492
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15493
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15494
15494
|
class BaseAdapter {
|
|
15495
15495
|
constructor(map, options) {
|
|
15496
15496
|
this.map = map;
|
|
@@ -15525,19 +15525,19 @@ var LeafletMapAdapter = (function () {
|
|
|
15525
15525
|
};
|
|
15526
15526
|
}
|
|
15527
15527
|
|
|
15528
|
-
var __defProp$
|
|
15529
|
-
var __getOwnPropSymbols$
|
|
15530
|
-
var __hasOwnProp$
|
|
15531
|
-
var __propIsEnum$
|
|
15532
|
-
var __defNormalProp$
|
|
15533
|
-
var __spreadValues$
|
|
15528
|
+
var __defProp$c = Object.defineProperty;
|
|
15529
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
15530
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
15531
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
15532
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15533
|
+
var __spreadValues$9 = (a, b) => {
|
|
15534
15534
|
for (var prop in b || (b = {}))
|
|
15535
|
-
if (__hasOwnProp$
|
|
15536
|
-
__defNormalProp$
|
|
15537
|
-
if (__getOwnPropSymbols$
|
|
15538
|
-
for (var prop of __getOwnPropSymbols$
|
|
15539
|
-
if (__propIsEnum$
|
|
15540
|
-
__defNormalProp$
|
|
15535
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
15536
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
15537
|
+
if (__getOwnPropSymbols$9)
|
|
15538
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
15539
|
+
if (__propIsEnum$9.call(b, prop))
|
|
15540
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
15541
15541
|
}
|
|
15542
15542
|
return a;
|
|
15543
15543
|
};
|
|
@@ -15547,7 +15547,7 @@ var LeafletMapAdapter = (function () {
|
|
|
15547
15547
|
}) {
|
|
15548
15548
|
const layer_ = source.target;
|
|
15549
15549
|
const feature = layer_.feature;
|
|
15550
|
-
const opt = __spreadValues$
|
|
15550
|
+
const opt = __spreadValues$9({
|
|
15551
15551
|
layer,
|
|
15552
15552
|
feature,
|
|
15553
15553
|
event: convertMapClickEvent(source),
|
|
@@ -15556,23 +15556,23 @@ var LeafletMapAdapter = (function () {
|
|
|
15556
15556
|
return opt;
|
|
15557
15557
|
}
|
|
15558
15558
|
|
|
15559
|
-
var __defProp$
|
|
15560
|
-
var __getOwnPropSymbols$
|
|
15561
|
-
var __hasOwnProp$
|
|
15562
|
-
var __propIsEnum$
|
|
15563
|
-
var __defNormalProp$
|
|
15564
|
-
var __spreadValues$
|
|
15559
|
+
var __defProp$b = Object.defineProperty;
|
|
15560
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
15561
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
15562
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
15563
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15564
|
+
var __spreadValues$8 = (a, b) => {
|
|
15565
15565
|
for (var prop in b || (b = {}))
|
|
15566
|
-
if (__hasOwnProp$
|
|
15567
|
-
__defNormalProp$
|
|
15568
|
-
if (__getOwnPropSymbols$
|
|
15569
|
-
for (var prop of __getOwnPropSymbols$
|
|
15570
|
-
if (__propIsEnum$
|
|
15571
|
-
__defNormalProp$
|
|
15566
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
15567
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
15568
|
+
if (__getOwnPropSymbols$8)
|
|
15569
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
15570
|
+
if (__propIsEnum$8.call(b, prop))
|
|
15571
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
15572
15572
|
}
|
|
15573
15573
|
return a;
|
|
15574
15574
|
};
|
|
15575
|
-
var __publicField$7 = (obj, key, value) => __defNormalProp$
|
|
15575
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15576
15576
|
class GeoJsonEvents {
|
|
15577
15577
|
constructor(layer) {
|
|
15578
15578
|
__publicField$7(this, "layer");
|
|
@@ -15588,7 +15588,7 @@ var LeafletMapAdapter = (function () {
|
|
|
15588
15588
|
if (onClick_) {
|
|
15589
15589
|
this._onclick = (e) => {
|
|
15590
15590
|
const selected = !!this.layer._getSelected(layer);
|
|
15591
|
-
onClick_(__spreadValues$
|
|
15591
|
+
onClick_(__spreadValues$8({
|
|
15592
15592
|
selected
|
|
15593
15593
|
}, this._createMouseEvent(e)));
|
|
15594
15594
|
};
|
|
@@ -15598,7 +15598,7 @@ var LeafletMapAdapter = (function () {
|
|
|
15598
15598
|
this._ondblclick = (e) => {
|
|
15599
15599
|
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
15600
15600
|
const selected = !!this.layer._getSelected(layer);
|
|
15601
|
-
onDoubleClick(__spreadValues$
|
|
15601
|
+
onDoubleClick(__spreadValues$8({
|
|
15602
15602
|
selected
|
|
15603
15603
|
}, this._createMouseEvent(e)));
|
|
15604
15604
|
};
|
|
@@ -15649,21 +15649,21 @@ var LeafletMapAdapter = (function () {
|
|
|
15649
15649
|
return false;
|
|
15650
15650
|
}
|
|
15651
15651
|
|
|
15652
|
-
var __defProp$
|
|
15652
|
+
var __defProp$a = Object.defineProperty;
|
|
15653
15653
|
var __defProps$5 = Object.defineProperties;
|
|
15654
15654
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
15655
|
-
var __getOwnPropSymbols$
|
|
15656
|
-
var __hasOwnProp$
|
|
15657
|
-
var __propIsEnum$
|
|
15658
|
-
var __defNormalProp$
|
|
15659
|
-
var __spreadValues$
|
|
15655
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
15656
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
15657
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
15658
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15659
|
+
var __spreadValues$7 = (a, b) => {
|
|
15660
15660
|
for (var prop in b || (b = {}))
|
|
15661
|
-
if (__hasOwnProp$
|
|
15662
|
-
__defNormalProp$
|
|
15663
|
-
if (__getOwnPropSymbols$
|
|
15664
|
-
for (var prop of __getOwnPropSymbols$
|
|
15665
|
-
if (__propIsEnum$
|
|
15666
|
-
__defNormalProp$
|
|
15661
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
15662
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
15663
|
+
if (__getOwnPropSymbols$7)
|
|
15664
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
15665
|
+
if (__propIsEnum$7.call(b, prop))
|
|
15666
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
15667
15667
|
}
|
|
15668
15668
|
return a;
|
|
15669
15669
|
};
|
|
@@ -15671,16 +15671,16 @@ var LeafletMapAdapter = (function () {
|
|
|
15671
15671
|
var __objRest$2 = (source, exclude) => {
|
|
15672
15672
|
var target = {};
|
|
15673
15673
|
for (var prop in source)
|
|
15674
|
-
if (__hasOwnProp$
|
|
15674
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
15675
15675
|
target[prop] = source[prop];
|
|
15676
|
-
if (source != null && __getOwnPropSymbols$
|
|
15677
|
-
for (var prop of __getOwnPropSymbols$
|
|
15678
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
15676
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
15677
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
15678
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
15679
15679
|
target[prop] = source[prop];
|
|
15680
15680
|
}
|
|
15681
15681
|
return target;
|
|
15682
15682
|
};
|
|
15683
|
-
var __publicField$6 = (obj, key, value) => __defNormalProp$
|
|
15683
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
|
|
15684
15684
|
class GeoJsonPaint {
|
|
15685
15685
|
constructor(layer) {
|
|
15686
15686
|
__publicField$6(this, "layer");
|
|
@@ -15762,7 +15762,7 @@ var LeafletMapAdapter = (function () {
|
|
|
15762
15762
|
if (html) {
|
|
15763
15763
|
element.innerHTML = html;
|
|
15764
15764
|
}
|
|
15765
|
-
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$5(__spreadValues$
|
|
15765
|
+
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$5(__spreadValues$7({
|
|
15766
15766
|
className: ""
|
|
15767
15767
|
}, toLIconOpt), {
|
|
15768
15768
|
html: element
|
|
@@ -15788,7 +15788,7 @@ var LeafletMapAdapter = (function () {
|
|
|
15788
15788
|
}
|
|
15789
15789
|
return (_, latlng) => {
|
|
15790
15790
|
const p = PAINT;
|
|
15791
|
-
return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$
|
|
15791
|
+
return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$7(__spreadValues$7({}, p), icon)));
|
|
15792
15792
|
};
|
|
15793
15793
|
}
|
|
15794
15794
|
createPaintOptions(paint) {
|
|
@@ -15810,26 +15810,26 @@ var LeafletMapAdapter = (function () {
|
|
|
15810
15810
|
}
|
|
15811
15811
|
}
|
|
15812
15812
|
|
|
15813
|
-
var __defProp$
|
|
15813
|
+
var __defProp$9 = Object.defineProperty;
|
|
15814
15814
|
var __defProps$4 = Object.defineProperties;
|
|
15815
15815
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
15816
|
-
var __getOwnPropSymbols$
|
|
15817
|
-
var __hasOwnProp$
|
|
15818
|
-
var __propIsEnum$
|
|
15819
|
-
var __defNormalProp$
|
|
15820
|
-
var __spreadValues$
|
|
15816
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
15817
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
15818
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
15819
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15820
|
+
var __spreadValues$6 = (a, b) => {
|
|
15821
15821
|
for (var prop in b || (b = {}))
|
|
15822
|
-
if (__hasOwnProp$
|
|
15823
|
-
__defNormalProp$
|
|
15824
|
-
if (__getOwnPropSymbols$
|
|
15825
|
-
for (var prop of __getOwnPropSymbols$
|
|
15826
|
-
if (__propIsEnum$
|
|
15827
|
-
__defNormalProp$
|
|
15822
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
15823
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
15824
|
+
if (__getOwnPropSymbols$6)
|
|
15825
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
15826
|
+
if (__propIsEnum$6.call(b, prop))
|
|
15827
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
15828
15828
|
}
|
|
15829
15829
|
return a;
|
|
15830
15830
|
};
|
|
15831
15831
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
15832
|
-
var __publicField$5 = (obj, key, value) => __defNormalProp$
|
|
15832
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15833
15833
|
var __async = (__this, __arguments, generator) => {
|
|
15834
15834
|
return new Promise((resolve, reject) => {
|
|
15835
15835
|
var fulfilled = (value) => {
|
|
@@ -15877,7 +15877,7 @@ var LeafletMapAdapter = (function () {
|
|
|
15877
15877
|
addLayer(options) {
|
|
15878
15878
|
Object.assign(this.options, options);
|
|
15879
15879
|
this.paint = options.paint;
|
|
15880
|
-
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$4(__spreadValues$
|
|
15880
|
+
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$4(__spreadValues$6({}, options.nativeOptions), {
|
|
15881
15881
|
pane: this.pane
|
|
15882
15882
|
}));
|
|
15883
15883
|
this.selectedPaint = options.selectedPaint;
|
|
@@ -15926,7 +15926,7 @@ var LeafletMapAdapter = (function () {
|
|
|
15926
15926
|
}
|
|
15927
15927
|
getSelected() {
|
|
15928
15928
|
return this._selectedLayers.map((x) => {
|
|
15929
|
-
return __spreadValues$
|
|
15929
|
+
return __spreadValues$6({
|
|
15930
15930
|
target: this,
|
|
15931
15931
|
feature: x.feature,
|
|
15932
15932
|
layer: x
|
|
@@ -15945,14 +15945,14 @@ var LeafletMapAdapter = (function () {
|
|
|
15945
15945
|
const filteredLayers = [];
|
|
15946
15946
|
this._layers.forEach(({ feature, layer }) => {
|
|
15947
15947
|
if (layer) {
|
|
15948
|
-
const ok = fun ? fun(__spreadValues$
|
|
15948
|
+
const ok = fun ? fun(__spreadValues$6({
|
|
15949
15949
|
target: this,
|
|
15950
15950
|
feature,
|
|
15951
15951
|
layer
|
|
15952
15952
|
}, createFeaturePositionOptions(feature))) : true;
|
|
15953
15953
|
if (ok) {
|
|
15954
15954
|
layer_.addLayer(layer);
|
|
15955
|
-
filteredLayers.push(__spreadValues$
|
|
15955
|
+
filteredLayers.push(__spreadValues$6({
|
|
15956
15956
|
target: this,
|
|
15957
15957
|
feature,
|
|
15958
15958
|
layer
|
|
@@ -15973,7 +15973,7 @@ var LeafletMapAdapter = (function () {
|
|
|
15973
15973
|
getLayers() {
|
|
15974
15974
|
return this._layers.map(({ layer, feature }) => {
|
|
15975
15975
|
const visible = layer && !!layer._map;
|
|
15976
|
-
return __spreadValues$
|
|
15976
|
+
return __spreadValues$6({
|
|
15977
15977
|
feature,
|
|
15978
15978
|
layer,
|
|
15979
15979
|
visible,
|
|
@@ -16091,13 +16091,13 @@ var LeafletMapAdapter = (function () {
|
|
|
16091
16091
|
}
|
|
16092
16092
|
}
|
|
16093
16093
|
updatePaint(paint) {
|
|
16094
|
-
this.paint = __spreadValues$
|
|
16094
|
+
this.paint = __spreadValues$6(__spreadValues$6({}, this.paint), paint);
|
|
16095
16095
|
for (const l of this._layers) {
|
|
16096
16096
|
this._paint.setPaint(l, this.paint);
|
|
16097
16097
|
}
|
|
16098
16098
|
}
|
|
16099
16099
|
updateSelectedPaint(paint) {
|
|
16100
|
-
this.selectedPaint = __spreadValues$
|
|
16100
|
+
this.selectedPaint = __spreadValues$6(__spreadValues$6({}, this.selectedPaint), paint);
|
|
16101
16101
|
for (const l of this._selectedLayers) {
|
|
16102
16102
|
this._paint.setPaint(l, this.selectedPaint);
|
|
16103
16103
|
}
|
|
@@ -16114,7 +16114,7 @@ var LeafletMapAdapter = (function () {
|
|
|
16114
16114
|
if (feature.properties && labelField) {
|
|
16115
16115
|
message = feature.properties[labelField];
|
|
16116
16116
|
} else if (label) {
|
|
16117
|
-
message = label(__spreadValues$
|
|
16117
|
+
message = label(__spreadValues$6(__spreadValues$6({
|
|
16118
16118
|
target: this
|
|
16119
16119
|
}, layerDef), createFeaturePositionOptions(feature)));
|
|
16120
16120
|
}
|
|
@@ -16133,7 +16133,7 @@ var LeafletMapAdapter = (function () {
|
|
|
16133
16133
|
autoPan,
|
|
16134
16134
|
maxWidth,
|
|
16135
16135
|
closeButton: closeButton_
|
|
16136
|
-
} = __spreadValues$
|
|
16136
|
+
} = __spreadValues$6({
|
|
16137
16137
|
minWidth: 300
|
|
16138
16138
|
}, options);
|
|
16139
16139
|
const closeButton = closeButton_ != null ? closeButton_ : !this.options.selectOnHover;
|
|
@@ -16149,7 +16149,7 @@ var LeafletMapAdapter = (function () {
|
|
|
16149
16149
|
};
|
|
16150
16150
|
let content;
|
|
16151
16151
|
if (options.createPopupContent) {
|
|
16152
|
-
content = yield options.createPopupContent(__spreadValues$
|
|
16152
|
+
content = yield options.createPopupContent(__spreadValues$6({
|
|
16153
16153
|
layer,
|
|
16154
16154
|
feature,
|
|
16155
16155
|
target: this,
|
|
@@ -16227,9 +16227,9 @@ var LeafletMapAdapter = (function () {
|
|
|
16227
16227
|
lopt = {
|
|
16228
16228
|
style: (feature) => {
|
|
16229
16229
|
if (feature) {
|
|
16230
|
-
return this._paint.preparePaint(__spreadValues$
|
|
16230
|
+
return this._paint.preparePaint(__spreadValues$6(__spreadValues$6({}, PAINT), paint(feature)));
|
|
16231
16231
|
} else {
|
|
16232
|
-
return this._paint.preparePaint(__spreadProps$4(__spreadValues$
|
|
16232
|
+
return this._paint.preparePaint(__spreadProps$4(__spreadValues$6({}, PAINT), { type: "path" }));
|
|
16233
16233
|
}
|
|
16234
16234
|
}
|
|
16235
16235
|
};
|
|
@@ -16245,7 +16245,7 @@ var LeafletMapAdapter = (function () {
|
|
|
16245
16245
|
_onEachFeature(feature, layer) {
|
|
16246
16246
|
const layer_ = this.layer;
|
|
16247
16247
|
if (layer_) {
|
|
16248
|
-
const def = __spreadValues$
|
|
16248
|
+
const def = __spreadValues$6({
|
|
16249
16249
|
target: this,
|
|
16250
16250
|
feature,
|
|
16251
16251
|
layer
|
|
@@ -16280,7 +16280,7 @@ var LeafletMapAdapter = (function () {
|
|
|
16280
16280
|
setTimeout(() => {
|
|
16281
16281
|
if (popup) {
|
|
16282
16282
|
this._openPopup(
|
|
16283
|
-
__spreadValues$
|
|
16283
|
+
__spreadValues$6({
|
|
16284
16284
|
target: this,
|
|
16285
16285
|
layer,
|
|
16286
16286
|
feature
|
|
@@ -16298,7 +16298,7 @@ var LeafletMapAdapter = (function () {
|
|
|
16298
16298
|
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
16299
16299
|
const layer = e.target;
|
|
16300
16300
|
const feature = layer.feature;
|
|
16301
|
-
const def = __spreadValues$
|
|
16301
|
+
const def = __spreadValues$6({
|
|
16302
16302
|
target: this,
|
|
16303
16303
|
layer,
|
|
16304
16304
|
feature
|
|
@@ -16331,7 +16331,7 @@ var LeafletMapAdapter = (function () {
|
|
|
16331
16331
|
}
|
|
16332
16332
|
if (this.options.onSelect) {
|
|
16333
16333
|
const features = def.feature ? [def.feature] : [];
|
|
16334
|
-
this.options.onSelect(__spreadValues$
|
|
16334
|
+
this.options.onSelect(__spreadValues$6({
|
|
16335
16335
|
type,
|
|
16336
16336
|
layer: this,
|
|
16337
16337
|
features
|
|
@@ -16389,37 +16389,89 @@ var LeafletMapAdapter = (function () {
|
|
|
16389
16389
|
}
|
|
16390
16390
|
}
|
|
16391
16391
|
|
|
16392
|
+
var __defProp$8 = Object.defineProperty;
|
|
16393
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
16394
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
16395
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
16396
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16397
|
+
var __spreadValues$5 = (a, b) => {
|
|
16398
|
+
for (var prop in b || (b = {}))
|
|
16399
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
16400
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
16401
|
+
if (__getOwnPropSymbols$5)
|
|
16402
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
16403
|
+
if (__propIsEnum$5.call(b, prop))
|
|
16404
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
16405
|
+
}
|
|
16406
|
+
return a;
|
|
16407
|
+
};
|
|
16408
|
+
function hasHeaders(headers) {
|
|
16409
|
+
return !!headers && Object.keys(headers).length > 0;
|
|
16410
|
+
}
|
|
16411
|
+
function normalizeLayerRequestOptions(request) {
|
|
16412
|
+
if (!request) {
|
|
16413
|
+
return void 0;
|
|
16414
|
+
}
|
|
16415
|
+
const normalized = __spreadValues$5({}, request);
|
|
16416
|
+
return hasLayerRequestOptions(normalized) ? normalized : void 0;
|
|
16417
|
+
}
|
|
16418
|
+
function getLayerRequestOptions(options) {
|
|
16419
|
+
const request = options == null ? void 0 : options.request;
|
|
16420
|
+
const headers = __spreadValues$5(__spreadValues$5({}, (options == null ? void 0 : options.headers) || {}), (request == null ? void 0 : request.headers) || {});
|
|
16421
|
+
const result = {};
|
|
16422
|
+
if (hasHeaders(headers)) {
|
|
16423
|
+
result.headers = headers;
|
|
16424
|
+
}
|
|
16425
|
+
if (options == null ? void 0 : options.withCredentials) {
|
|
16426
|
+
result.credentials = "include";
|
|
16427
|
+
}
|
|
16428
|
+
if ((request == null ? void 0 : request.credentials) !== void 0) {
|
|
16429
|
+
result.credentials = request.credentials;
|
|
16430
|
+
}
|
|
16431
|
+
if ((request == null ? void 0 : request.cache) !== void 0) {
|
|
16432
|
+
result.cache = request.cache;
|
|
16433
|
+
}
|
|
16434
|
+
return normalizeLayerRequestOptions(result);
|
|
16435
|
+
}
|
|
16436
|
+
function hasLayerRequestOptions(request) {
|
|
16437
|
+
return !!(request && (hasHeaders(request.headers) || request.credentials !== void 0 || request.cache !== void 0 && request.cache !== "default"));
|
|
16438
|
+
}
|
|
16439
|
+
|
|
16392
16440
|
function callAjax({
|
|
16393
16441
|
src,
|
|
16394
16442
|
headers,
|
|
16395
|
-
withCredentials
|
|
16443
|
+
withCredentials,
|
|
16444
|
+
request
|
|
16396
16445
|
}) {
|
|
16397
|
-
|
|
16398
|
-
|
|
16399
|
-
|
|
16400
|
-
|
|
16401
|
-
|
|
16402
|
-
|
|
16403
|
-
|
|
16404
|
-
|
|
16446
|
+
const layerRequest = getLayerRequestOptions({
|
|
16447
|
+
headers,
|
|
16448
|
+
request,
|
|
16449
|
+
withCredentials
|
|
16450
|
+
});
|
|
16451
|
+
const requestHeaders = (layerRequest == null ? void 0 : layerRequest.headers) || {};
|
|
16452
|
+
const controller = new AbortController();
|
|
16453
|
+
const promise = fetch(src, {
|
|
16454
|
+
cache: layerRequest == null ? void 0 : layerRequest.cache,
|
|
16455
|
+
credentials: layerRequest == null ? void 0 : layerRequest.credentials,
|
|
16456
|
+
headers: requestHeaders,
|
|
16457
|
+
signal: controller.signal
|
|
16458
|
+
}).then((response) => {
|
|
16459
|
+
if (!response.ok) {
|
|
16460
|
+
throw new Error(response.statusText);
|
|
16405
16461
|
}
|
|
16406
|
-
|
|
16407
|
-
|
|
16462
|
+
return response.blob();
|
|
16463
|
+
}).then((blob) => {
|
|
16464
|
+
const urlCreator = window.URL || window.webkitURL;
|
|
16465
|
+
return urlCreator.createObjectURL(blob);
|
|
16466
|
+
}).catch((er) => {
|
|
16467
|
+
if (er.name === "AbortError") {
|
|
16468
|
+
return "";
|
|
16408
16469
|
}
|
|
16409
|
-
|
|
16410
|
-
const arrayBufferView = new Uint8Array(this.response);
|
|
16411
|
-
const blob = new Blob([arrayBufferView], { type: "image/png" });
|
|
16412
|
-
const urlCreator = window.URL || window.webkitURL;
|
|
16413
|
-
const imageUrl = urlCreator.createObjectURL(blob);
|
|
16414
|
-
resolve(imageUrl);
|
|
16415
|
-
};
|
|
16416
|
-
xhr.onerror = reject;
|
|
16417
|
-
xhr.send();
|
|
16418
|
-
abortFunc = () => {
|
|
16419
|
-
xhr.abort();
|
|
16420
|
-
resolve("");
|
|
16421
|
-
};
|
|
16470
|
+
throw er;
|
|
16422
16471
|
});
|
|
16472
|
+
const abortFunc = () => {
|
|
16473
|
+
controller.abort();
|
|
16474
|
+
};
|
|
16423
16475
|
return [promise, abortFunc];
|
|
16424
16476
|
}
|
|
16425
16477
|
|
|
@@ -16528,7 +16580,7 @@ var LeafletMapAdapter = (function () {
|
|
|
16528
16580
|
}
|
|
16529
16581
|
_initImage() {
|
|
16530
16582
|
super._initImage();
|
|
16531
|
-
const { headers, withCredentials } = this.options;
|
|
16583
|
+
const { headers, request, withCredentials } = this.options;
|
|
16532
16584
|
const img = this._image;
|
|
16533
16585
|
const src = img.src;
|
|
16534
16586
|
img.src = "";
|
|
@@ -16536,6 +16588,7 @@ var LeafletMapAdapter = (function () {
|
|
|
16536
16588
|
const [promise, abortFunc] = callAjax({
|
|
16537
16589
|
src,
|
|
16538
16590
|
headers,
|
|
16591
|
+
request,
|
|
16539
16592
|
withCredentials
|
|
16540
16593
|
});
|
|
16541
16594
|
promise.then((imgUrl) => {
|
|
@@ -16644,6 +16697,7 @@ var LeafletMapAdapter = (function () {
|
|
|
16644
16697
|
opacity: 0,
|
|
16645
16698
|
pane: this.options.pane,
|
|
16646
16699
|
headers: this.options.headers,
|
|
16700
|
+
request: this.options.request,
|
|
16647
16701
|
withCredentials: this.options.withCredentials
|
|
16648
16702
|
});
|
|
16649
16703
|
overlay.addTo(this._map);
|
|
@@ -16768,15 +16822,17 @@ var LeafletMapAdapter = (function () {
|
|
|
16768
16822
|
const url = options && options.url;
|
|
16769
16823
|
if (url) {
|
|
16770
16824
|
const updateWmsParamsFromOpt = options.updateWmsParams;
|
|
16771
|
-
|
|
16825
|
+
const request = getLayerRequestOptions(options);
|
|
16826
|
+
this.layer = new ImageLayer(url, __spreadProps$3(__spreadValues$4(__spreadValues$4(__spreadValues$4({
|
|
16772
16827
|
pane: this.pane,
|
|
16773
|
-
headers: options.headers,
|
|
16774
16828
|
setViewDelay: options.setViewDelay
|
|
16775
16829
|
}, __spreadProps$3(__spreadValues$4({
|
|
16776
16830
|
transparent: true
|
|
16777
16831
|
}, options), {
|
|
16778
16832
|
opacity: (_a = options.opacity) != null ? _a : void 0
|
|
16779
|
-
})), options.params), options.nativeOptions)
|
|
16833
|
+
})), options.params), options.nativeOptions), {
|
|
16834
|
+
request
|
|
16835
|
+
}));
|
|
16780
16836
|
if (updateWmsParamsFromOpt) {
|
|
16781
16837
|
const updateWmsParams = this.layer.updateWmsParams;
|
|
16782
16838
|
this.layer.updateWmsParams = function(map) {
|
|
@@ -16813,7 +16869,8 @@ var LeafletMapAdapter = (function () {
|
|
|
16813
16869
|
const [promise, abortFunc] = callAjax({
|
|
16814
16870
|
src,
|
|
16815
16871
|
withCredentials: this.options.withCredentials,
|
|
16816
|
-
headers: this.options.headers
|
|
16872
|
+
headers: this.options.headers,
|
|
16873
|
+
request: this.options.request
|
|
16817
16874
|
});
|
|
16818
16875
|
promise.then((response) => {
|
|
16819
16876
|
tile.src = response;
|
|
@@ -16904,10 +16961,10 @@ var LeafletMapAdapter = (function () {
|
|
|
16904
16961
|
tileLayerOptions.subdomains = opt.subdomains;
|
|
16905
16962
|
}
|
|
16906
16963
|
let layer;
|
|
16907
|
-
|
|
16964
|
+
const request = getLayerRequestOptions(opt);
|
|
16965
|
+
if (request) {
|
|
16908
16966
|
layer = new TileLayer(url, __spreadProps$2(__spreadValues$3({}, tileLayerOptions), {
|
|
16909
|
-
|
|
16910
|
-
withCredentials: opt.withCredentials,
|
|
16967
|
+
request,
|
|
16911
16968
|
setViewDelay: opt.setViewDelay
|
|
16912
16969
|
}));
|
|
16913
16970
|
} else {
|
|
@@ -17012,10 +17069,10 @@ var LeafletMapAdapter = (function () {
|
|
|
17012
17069
|
transparent: true
|
|
17013
17070
|
}, options.nativeOptions);
|
|
17014
17071
|
let layer;
|
|
17015
|
-
|
|
17072
|
+
const request = getLayerRequestOptions(opt);
|
|
17073
|
+
if (request) {
|
|
17016
17074
|
layer = new WmsLayer(url, __spreadProps(__spreadValues$1({}, layerOptions), {
|
|
17017
|
-
|
|
17018
|
-
withCredentials: opt.withCredentials
|
|
17075
|
+
request
|
|
17019
17076
|
}));
|
|
17020
17077
|
} else {
|
|
17021
17078
|
layer = new leafletSrcExports.TileLayer.WMS(url, layerOptions);
|