@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
|
function getElement(el) {
|
|
3
3
|
if (typeof el === "string") {
|
|
4
4
|
let el_ = document.getElementById(el);
|
|
@@ -13,21 +13,21 @@ function getElement(el) {
|
|
|
13
13
|
return el;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
var __defProp$
|
|
16
|
+
var __defProp$h = Object.defineProperty;
|
|
17
17
|
var __defProps$8 = Object.defineProperties;
|
|
18
18
|
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
19
|
-
var __getOwnPropSymbols$
|
|
20
|
-
var __hasOwnProp$
|
|
21
|
-
var __propIsEnum$
|
|
22
|
-
var __defNormalProp$
|
|
23
|
-
var __spreadValues$
|
|
19
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
20
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
21
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
22
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23
|
+
var __spreadValues$c = (a, b) => {
|
|
24
24
|
for (var prop in b || (b = {}))
|
|
25
|
-
if (__hasOwnProp$
|
|
26
|
-
__defNormalProp$
|
|
27
|
-
if (__getOwnPropSymbols$
|
|
28
|
-
for (var prop of __getOwnPropSymbols$
|
|
29
|
-
if (__propIsEnum$
|
|
30
|
-
__defNormalProp$
|
|
25
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
26
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
27
|
+
if (__getOwnPropSymbols$c)
|
|
28
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
29
|
+
if (__propIsEnum$c.call(b, prop))
|
|
30
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
31
31
|
}
|
|
32
32
|
return a;
|
|
33
33
|
};
|
|
@@ -35,7 +35,7 @@ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
|
35
35
|
const controlOptions = /* @__PURE__ */ new WeakMap();
|
|
36
36
|
function resolveControlOptions(options = {}) {
|
|
37
37
|
var _a;
|
|
38
|
-
return __spreadProps$8(__spreadValues$
|
|
38
|
+
return __spreadProps$8(__spreadValues$c({}, options), {
|
|
39
39
|
margin: (_a = options.margin) != null ? _a : options.bar
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -46,9 +46,9 @@ function getControlOptions(control) {
|
|
|
46
46
|
return control ? controlOptions.get(control) : void 0;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
var __defProp$
|
|
50
|
-
var __defNormalProp$
|
|
51
|
-
var __publicField$a = (obj, key, value) => __defNormalProp$
|
|
49
|
+
var __defProp$g = Object.defineProperty;
|
|
50
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
51
|
+
var __publicField$a = (obj, key, value) => __defNormalProp$g(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
52
52
|
class ControlContainer {
|
|
53
53
|
constructor(opt = {}) {
|
|
54
54
|
__publicField$a(this, "classPrefix", "webmap");
|
|
@@ -14670,21 +14670,21 @@ function requireLeafletSrc () {
|
|
|
14670
14670
|
|
|
14671
14671
|
var leafletSrcExports = /*@__PURE__*/ requireLeafletSrc();
|
|
14672
14672
|
|
|
14673
|
-
var __defProp$
|
|
14673
|
+
var __defProp$f = Object.defineProperty;
|
|
14674
14674
|
var __defProps$7 = Object.defineProperties;
|
|
14675
14675
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
14676
|
-
var __getOwnPropSymbols$
|
|
14677
|
-
var __hasOwnProp$
|
|
14678
|
-
var __propIsEnum$
|
|
14679
|
-
var __defNormalProp$
|
|
14680
|
-
var __spreadValues$
|
|
14676
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
14677
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
14678
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
14679
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14680
|
+
var __spreadValues$b = (a, b) => {
|
|
14681
14681
|
for (var prop in b || (b = {}))
|
|
14682
|
-
if (__hasOwnProp$
|
|
14683
|
-
__defNormalProp$
|
|
14684
|
-
if (__getOwnPropSymbols$
|
|
14685
|
-
for (var prop of __getOwnPropSymbols$
|
|
14686
|
-
if (__propIsEnum$
|
|
14687
|
-
__defNormalProp$
|
|
14682
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
14683
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
14684
|
+
if (__getOwnPropSymbols$b)
|
|
14685
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
14686
|
+
if (__propIsEnum$b.call(b, prop))
|
|
14687
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
14688
14688
|
}
|
|
14689
14689
|
return a;
|
|
14690
14690
|
};
|
|
@@ -14700,7 +14700,7 @@ function createControl(control, options = {}, map) {
|
|
|
14700
14700
|
].filter(Boolean).join(" ");
|
|
14701
14701
|
const element = createControlElement(
|
|
14702
14702
|
control,
|
|
14703
|
-
__spreadProps$7(__spreadValues$
|
|
14703
|
+
__spreadProps$7(__spreadValues$b({}, resolvedOptions), { addClass }),
|
|
14704
14704
|
map != null ? map : leafletMap
|
|
14705
14705
|
);
|
|
14706
14706
|
if (!resolvedOptions.margin) {
|
|
@@ -14747,26 +14747,26 @@ function createToggleControl(options, map) {
|
|
|
14747
14747
|
return control;
|
|
14748
14748
|
}
|
|
14749
14749
|
|
|
14750
|
-
var __defProp$
|
|
14750
|
+
var __defProp$e = Object.defineProperty;
|
|
14751
14751
|
var __defProps$6 = Object.defineProperties;
|
|
14752
14752
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
14753
|
-
var __getOwnPropSymbols$
|
|
14754
|
-
var __hasOwnProp$
|
|
14755
|
-
var __propIsEnum$
|
|
14756
|
-
var __defNormalProp$
|
|
14757
|
-
var __spreadValues$
|
|
14753
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
14754
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
14755
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
14756
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14757
|
+
var __spreadValues$a = (a, b) => {
|
|
14758
14758
|
for (var prop in b || (b = {}))
|
|
14759
|
-
if (__hasOwnProp$
|
|
14760
|
-
__defNormalProp$
|
|
14761
|
-
if (__getOwnPropSymbols$
|
|
14762
|
-
for (var prop of __getOwnPropSymbols$
|
|
14763
|
-
if (__propIsEnum$
|
|
14764
|
-
__defNormalProp$
|
|
14759
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
14760
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
14761
|
+
if (__getOwnPropSymbols$a)
|
|
14762
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
14763
|
+
if (__propIsEnum$a.call(b, prop))
|
|
14764
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
14765
14765
|
}
|
|
14766
14766
|
return a;
|
|
14767
14767
|
};
|
|
14768
14768
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
14769
|
-
var __publicField$9 = (obj, key, value) => __defNormalProp$
|
|
14769
|
+
var __publicField$9 = (obj, key, value) => __defNormalProp$e(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14770
14770
|
class LeafletControlContainer {
|
|
14771
14771
|
constructor(map, options = {}) {
|
|
14772
14772
|
__publicField$9(this, "map");
|
|
@@ -14834,7 +14834,7 @@ class LeafletControlContainer {
|
|
|
14834
14834
|
const mapAny = this.map;
|
|
14835
14835
|
const controlCorners = mapAny._controlCorners || {};
|
|
14836
14836
|
const getCorner = (key, selector) => controlCorners[key] || this.map.getContainer().querySelector(selector) || void 0;
|
|
14837
|
-
return new ControlContainer(__spreadProps$6(__spreadValues$
|
|
14837
|
+
return new ControlContainer(__spreadProps$6(__spreadValues$a({}, options), {
|
|
14838
14838
|
map: this.map,
|
|
14839
14839
|
container: mapAny._controlContainer,
|
|
14840
14840
|
positionContainers: {
|
|
@@ -15485,9 +15485,9 @@ function createFeaturePositionOptions(features) {
|
|
|
15485
15485
|
};
|
|
15486
15486
|
}
|
|
15487
15487
|
|
|
15488
|
-
var __defProp$
|
|
15489
|
-
var __defNormalProp$
|
|
15490
|
-
var __publicField$8 = (obj, key, value) => __defNormalProp$
|
|
15488
|
+
var __defProp$d = Object.defineProperty;
|
|
15489
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15490
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$d(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15491
15491
|
class BaseAdapter {
|
|
15492
15492
|
constructor(map, options) {
|
|
15493
15493
|
this.map = map;
|
|
@@ -15522,19 +15522,19 @@ function convertMapClickEvent(evt) {
|
|
|
15522
15522
|
};
|
|
15523
15523
|
}
|
|
15524
15524
|
|
|
15525
|
-
var __defProp$
|
|
15526
|
-
var __getOwnPropSymbols$
|
|
15527
|
-
var __hasOwnProp$
|
|
15528
|
-
var __propIsEnum$
|
|
15529
|
-
var __defNormalProp$
|
|
15530
|
-
var __spreadValues$
|
|
15525
|
+
var __defProp$c = Object.defineProperty;
|
|
15526
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
15527
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
15528
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
15529
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15530
|
+
var __spreadValues$9 = (a, b) => {
|
|
15531
15531
|
for (var prop in b || (b = {}))
|
|
15532
|
-
if (__hasOwnProp$
|
|
15533
|
-
__defNormalProp$
|
|
15534
|
-
if (__getOwnPropSymbols$
|
|
15535
|
-
for (var prop of __getOwnPropSymbols$
|
|
15536
|
-
if (__propIsEnum$
|
|
15537
|
-
__defNormalProp$
|
|
15532
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
15533
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
15534
|
+
if (__getOwnPropSymbols$9)
|
|
15535
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
15536
|
+
if (__propIsEnum$9.call(b, prop))
|
|
15537
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
15538
15538
|
}
|
|
15539
15539
|
return a;
|
|
15540
15540
|
};
|
|
@@ -15544,7 +15544,7 @@ function createMouseEvent({
|
|
|
15544
15544
|
}) {
|
|
15545
15545
|
const layer_ = source.target;
|
|
15546
15546
|
const feature = layer_.feature;
|
|
15547
|
-
const opt = __spreadValues$
|
|
15547
|
+
const opt = __spreadValues$9({
|
|
15548
15548
|
layer,
|
|
15549
15549
|
feature,
|
|
15550
15550
|
event: convertMapClickEvent(source),
|
|
@@ -15553,23 +15553,23 @@ function createMouseEvent({
|
|
|
15553
15553
|
return opt;
|
|
15554
15554
|
}
|
|
15555
15555
|
|
|
15556
|
-
var __defProp$
|
|
15557
|
-
var __getOwnPropSymbols$
|
|
15558
|
-
var __hasOwnProp$
|
|
15559
|
-
var __propIsEnum$
|
|
15560
|
-
var __defNormalProp$
|
|
15561
|
-
var __spreadValues$
|
|
15556
|
+
var __defProp$b = Object.defineProperty;
|
|
15557
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
15558
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
15559
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
15560
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15561
|
+
var __spreadValues$8 = (a, b) => {
|
|
15562
15562
|
for (var prop in b || (b = {}))
|
|
15563
|
-
if (__hasOwnProp$
|
|
15564
|
-
__defNormalProp$
|
|
15565
|
-
if (__getOwnPropSymbols$
|
|
15566
|
-
for (var prop of __getOwnPropSymbols$
|
|
15567
|
-
if (__propIsEnum$
|
|
15568
|
-
__defNormalProp$
|
|
15563
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
15564
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
15565
|
+
if (__getOwnPropSymbols$8)
|
|
15566
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
15567
|
+
if (__propIsEnum$8.call(b, prop))
|
|
15568
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
15569
15569
|
}
|
|
15570
15570
|
return a;
|
|
15571
15571
|
};
|
|
15572
|
-
var __publicField$7 = (obj, key, value) => __defNormalProp$
|
|
15572
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$b(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15573
15573
|
class GeoJsonEvents {
|
|
15574
15574
|
constructor(layer) {
|
|
15575
15575
|
__publicField$7(this, "layer");
|
|
@@ -15585,7 +15585,7 @@ class GeoJsonEvents {
|
|
|
15585
15585
|
if (onClick_) {
|
|
15586
15586
|
this._onclick = (e) => {
|
|
15587
15587
|
const selected = !!this.layer._getSelected(layer);
|
|
15588
|
-
onClick_(__spreadValues$
|
|
15588
|
+
onClick_(__spreadValues$8({
|
|
15589
15589
|
selected
|
|
15590
15590
|
}, this._createMouseEvent(e)));
|
|
15591
15591
|
};
|
|
@@ -15595,7 +15595,7 @@ class GeoJsonEvents {
|
|
|
15595
15595
|
this._ondblclick = (e) => {
|
|
15596
15596
|
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
15597
15597
|
const selected = !!this.layer._getSelected(layer);
|
|
15598
|
-
onDoubleClick(__spreadValues$
|
|
15598
|
+
onDoubleClick(__spreadValues$8({
|
|
15599
15599
|
selected
|
|
15600
15600
|
}, this._createMouseEvent(e)));
|
|
15601
15601
|
};
|
|
@@ -15646,21 +15646,21 @@ function isPaintCallback(paint) {
|
|
|
15646
15646
|
return false;
|
|
15647
15647
|
}
|
|
15648
15648
|
|
|
15649
|
-
var __defProp$
|
|
15649
|
+
var __defProp$a = Object.defineProperty;
|
|
15650
15650
|
var __defProps$5 = Object.defineProperties;
|
|
15651
15651
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
15652
|
-
var __getOwnPropSymbols$
|
|
15653
|
-
var __hasOwnProp$
|
|
15654
|
-
var __propIsEnum$
|
|
15655
|
-
var __defNormalProp$
|
|
15656
|
-
var __spreadValues$
|
|
15652
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
15653
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
15654
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
15655
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15656
|
+
var __spreadValues$7 = (a, b) => {
|
|
15657
15657
|
for (var prop in b || (b = {}))
|
|
15658
|
-
if (__hasOwnProp$
|
|
15659
|
-
__defNormalProp$
|
|
15660
|
-
if (__getOwnPropSymbols$
|
|
15661
|
-
for (var prop of __getOwnPropSymbols$
|
|
15662
|
-
if (__propIsEnum$
|
|
15663
|
-
__defNormalProp$
|
|
15658
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
15659
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
15660
|
+
if (__getOwnPropSymbols$7)
|
|
15661
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
15662
|
+
if (__propIsEnum$7.call(b, prop))
|
|
15663
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
15664
15664
|
}
|
|
15665
15665
|
return a;
|
|
15666
15666
|
};
|
|
@@ -15668,16 +15668,16 @@ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
|
15668
15668
|
var __objRest$2 = (source, exclude) => {
|
|
15669
15669
|
var target = {};
|
|
15670
15670
|
for (var prop in source)
|
|
15671
|
-
if (__hasOwnProp$
|
|
15671
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
15672
15672
|
target[prop] = source[prop];
|
|
15673
|
-
if (source != null && __getOwnPropSymbols$
|
|
15674
|
-
for (var prop of __getOwnPropSymbols$
|
|
15675
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
15673
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
15674
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
15675
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
15676
15676
|
target[prop] = source[prop];
|
|
15677
15677
|
}
|
|
15678
15678
|
return target;
|
|
15679
15679
|
};
|
|
15680
|
-
var __publicField$6 = (obj, key, value) => __defNormalProp$
|
|
15680
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$a(obj, key + "" , value);
|
|
15681
15681
|
class GeoJsonPaint {
|
|
15682
15682
|
constructor(layer) {
|
|
15683
15683
|
__publicField$6(this, "layer");
|
|
@@ -15759,7 +15759,7 @@ class GeoJsonPaint {
|
|
|
15759
15759
|
if (html) {
|
|
15760
15760
|
element.innerHTML = html;
|
|
15761
15761
|
}
|
|
15762
|
-
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$5(__spreadValues$
|
|
15762
|
+
const divIcon = new leafletSrcExports.DivIcon(__spreadProps$5(__spreadValues$7({
|
|
15763
15763
|
className: ""
|
|
15764
15764
|
}, toLIconOpt), {
|
|
15765
15765
|
html: element
|
|
@@ -15785,7 +15785,7 @@ class GeoJsonPaint {
|
|
|
15785
15785
|
}
|
|
15786
15786
|
return (_, latlng) => {
|
|
15787
15787
|
const p = PAINT;
|
|
15788
|
-
return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$
|
|
15788
|
+
return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$7(__spreadValues$7({}, p), icon)));
|
|
15789
15789
|
};
|
|
15790
15790
|
}
|
|
15791
15791
|
createPaintOptions(paint) {
|
|
@@ -15807,26 +15807,26 @@ class GeoJsonPaint {
|
|
|
15807
15807
|
}
|
|
15808
15808
|
}
|
|
15809
15809
|
|
|
15810
|
-
var __defProp$
|
|
15810
|
+
var __defProp$9 = Object.defineProperty;
|
|
15811
15811
|
var __defProps$4 = Object.defineProperties;
|
|
15812
15812
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
15813
|
-
var __getOwnPropSymbols$
|
|
15814
|
-
var __hasOwnProp$
|
|
15815
|
-
var __propIsEnum$
|
|
15816
|
-
var __defNormalProp$
|
|
15817
|
-
var __spreadValues$
|
|
15813
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
15814
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
15815
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
15816
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15817
|
+
var __spreadValues$6 = (a, b) => {
|
|
15818
15818
|
for (var prop in b || (b = {}))
|
|
15819
|
-
if (__hasOwnProp$
|
|
15820
|
-
__defNormalProp$
|
|
15821
|
-
if (__getOwnPropSymbols$
|
|
15822
|
-
for (var prop of __getOwnPropSymbols$
|
|
15823
|
-
if (__propIsEnum$
|
|
15824
|
-
__defNormalProp$
|
|
15819
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
15820
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
15821
|
+
if (__getOwnPropSymbols$6)
|
|
15822
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
15823
|
+
if (__propIsEnum$6.call(b, prop))
|
|
15824
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
15825
15825
|
}
|
|
15826
15826
|
return a;
|
|
15827
15827
|
};
|
|
15828
15828
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
15829
|
-
var __publicField$5 = (obj, key, value) => __defNormalProp$
|
|
15829
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15830
15830
|
var __async = (__this, __arguments, generator) => {
|
|
15831
15831
|
return new Promise((resolve, reject) => {
|
|
15832
15832
|
var fulfilled = (value) => {
|
|
@@ -15874,7 +15874,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
15874
15874
|
addLayer(options) {
|
|
15875
15875
|
Object.assign(this.options, options);
|
|
15876
15876
|
this.paint = options.paint;
|
|
15877
|
-
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$4(__spreadValues$
|
|
15877
|
+
this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$4(__spreadValues$6({}, options.nativeOptions), {
|
|
15878
15878
|
pane: this.pane
|
|
15879
15879
|
}));
|
|
15880
15880
|
this.selectedPaint = options.selectedPaint;
|
|
@@ -15923,7 +15923,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
15923
15923
|
}
|
|
15924
15924
|
getSelected() {
|
|
15925
15925
|
return this._selectedLayers.map((x) => {
|
|
15926
|
-
return __spreadValues$
|
|
15926
|
+
return __spreadValues$6({
|
|
15927
15927
|
target: this,
|
|
15928
15928
|
feature: x.feature,
|
|
15929
15929
|
layer: x
|
|
@@ -15942,14 +15942,14 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
15942
15942
|
const filteredLayers = [];
|
|
15943
15943
|
this._layers.forEach(({ feature, layer }) => {
|
|
15944
15944
|
if (layer) {
|
|
15945
|
-
const ok = fun ? fun(__spreadValues$
|
|
15945
|
+
const ok = fun ? fun(__spreadValues$6({
|
|
15946
15946
|
target: this,
|
|
15947
15947
|
feature,
|
|
15948
15948
|
layer
|
|
15949
15949
|
}, createFeaturePositionOptions(feature))) : true;
|
|
15950
15950
|
if (ok) {
|
|
15951
15951
|
layer_.addLayer(layer);
|
|
15952
|
-
filteredLayers.push(__spreadValues$
|
|
15952
|
+
filteredLayers.push(__spreadValues$6({
|
|
15953
15953
|
target: this,
|
|
15954
15954
|
feature,
|
|
15955
15955
|
layer
|
|
@@ -15970,7 +15970,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
15970
15970
|
getLayers() {
|
|
15971
15971
|
return this._layers.map(({ layer, feature }) => {
|
|
15972
15972
|
const visible = layer && !!layer._map;
|
|
15973
|
-
return __spreadValues$
|
|
15973
|
+
return __spreadValues$6({
|
|
15974
15974
|
feature,
|
|
15975
15975
|
layer,
|
|
15976
15976
|
visible,
|
|
@@ -16088,13 +16088,13 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16088
16088
|
}
|
|
16089
16089
|
}
|
|
16090
16090
|
updatePaint(paint) {
|
|
16091
|
-
this.paint = __spreadValues$
|
|
16091
|
+
this.paint = __spreadValues$6(__spreadValues$6({}, this.paint), paint);
|
|
16092
16092
|
for (const l of this._layers) {
|
|
16093
16093
|
this._paint.setPaint(l, this.paint);
|
|
16094
16094
|
}
|
|
16095
16095
|
}
|
|
16096
16096
|
updateSelectedPaint(paint) {
|
|
16097
|
-
this.selectedPaint = __spreadValues$
|
|
16097
|
+
this.selectedPaint = __spreadValues$6(__spreadValues$6({}, this.selectedPaint), paint);
|
|
16098
16098
|
for (const l of this._selectedLayers) {
|
|
16099
16099
|
this._paint.setPaint(l, this.selectedPaint);
|
|
16100
16100
|
}
|
|
@@ -16111,7 +16111,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16111
16111
|
if (feature.properties && labelField) {
|
|
16112
16112
|
message = feature.properties[labelField];
|
|
16113
16113
|
} else if (label) {
|
|
16114
|
-
message = label(__spreadValues$
|
|
16114
|
+
message = label(__spreadValues$6(__spreadValues$6({
|
|
16115
16115
|
target: this
|
|
16116
16116
|
}, layerDef), createFeaturePositionOptions(feature)));
|
|
16117
16117
|
}
|
|
@@ -16130,7 +16130,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16130
16130
|
autoPan,
|
|
16131
16131
|
maxWidth,
|
|
16132
16132
|
closeButton: closeButton_
|
|
16133
|
-
} = __spreadValues$
|
|
16133
|
+
} = __spreadValues$6({
|
|
16134
16134
|
minWidth: 300
|
|
16135
16135
|
}, options);
|
|
16136
16136
|
const closeButton = closeButton_ != null ? closeButton_ : !this.options.selectOnHover;
|
|
@@ -16146,7 +16146,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16146
16146
|
};
|
|
16147
16147
|
let content;
|
|
16148
16148
|
if (options.createPopupContent) {
|
|
16149
|
-
content = yield options.createPopupContent(__spreadValues$
|
|
16149
|
+
content = yield options.createPopupContent(__spreadValues$6({
|
|
16150
16150
|
layer,
|
|
16151
16151
|
feature,
|
|
16152
16152
|
target: this,
|
|
@@ -16224,9 +16224,9 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16224
16224
|
lopt = {
|
|
16225
16225
|
style: (feature) => {
|
|
16226
16226
|
if (feature) {
|
|
16227
|
-
return this._paint.preparePaint(__spreadValues$
|
|
16227
|
+
return this._paint.preparePaint(__spreadValues$6(__spreadValues$6({}, PAINT), paint(feature)));
|
|
16228
16228
|
} else {
|
|
16229
|
-
return this._paint.preparePaint(__spreadProps$4(__spreadValues$
|
|
16229
|
+
return this._paint.preparePaint(__spreadProps$4(__spreadValues$6({}, PAINT), { type: "path" }));
|
|
16230
16230
|
}
|
|
16231
16231
|
}
|
|
16232
16232
|
};
|
|
@@ -16242,7 +16242,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16242
16242
|
_onEachFeature(feature, layer) {
|
|
16243
16243
|
const layer_ = this.layer;
|
|
16244
16244
|
if (layer_) {
|
|
16245
|
-
const def = __spreadValues$
|
|
16245
|
+
const def = __spreadValues$6({
|
|
16246
16246
|
target: this,
|
|
16247
16247
|
feature,
|
|
16248
16248
|
layer
|
|
@@ -16277,7 +16277,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16277
16277
|
setTimeout(() => {
|
|
16278
16278
|
if (popup) {
|
|
16279
16279
|
this._openPopup(
|
|
16280
|
-
__spreadValues$
|
|
16280
|
+
__spreadValues$6({
|
|
16281
16281
|
target: this,
|
|
16282
16282
|
layer,
|
|
16283
16283
|
feature
|
|
@@ -16295,7 +16295,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16295
16295
|
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
16296
16296
|
const layer = e.target;
|
|
16297
16297
|
const feature = layer.feature;
|
|
16298
|
-
const def = __spreadValues$
|
|
16298
|
+
const def = __spreadValues$6({
|
|
16299
16299
|
target: this,
|
|
16300
16300
|
layer,
|
|
16301
16301
|
feature
|
|
@@ -16328,7 +16328,7 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16328
16328
|
}
|
|
16329
16329
|
if (this.options.onSelect) {
|
|
16330
16330
|
const features = def.feature ? [def.feature] : [];
|
|
16331
|
-
this.options.onSelect(__spreadValues$
|
|
16331
|
+
this.options.onSelect(__spreadValues$6({
|
|
16332
16332
|
type,
|
|
16333
16333
|
layer: this,
|
|
16334
16334
|
features
|
|
@@ -16386,37 +16386,89 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
16386
16386
|
}
|
|
16387
16387
|
}
|
|
16388
16388
|
|
|
16389
|
+
var __defProp$8 = Object.defineProperty;
|
|
16390
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
16391
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
16392
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
16393
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16394
|
+
var __spreadValues$5 = (a, b) => {
|
|
16395
|
+
for (var prop in b || (b = {}))
|
|
16396
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
16397
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
16398
|
+
if (__getOwnPropSymbols$5)
|
|
16399
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
16400
|
+
if (__propIsEnum$5.call(b, prop))
|
|
16401
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
16402
|
+
}
|
|
16403
|
+
return a;
|
|
16404
|
+
};
|
|
16405
|
+
function hasHeaders(headers) {
|
|
16406
|
+
return !!headers && Object.keys(headers).length > 0;
|
|
16407
|
+
}
|
|
16408
|
+
function normalizeLayerRequestOptions(request) {
|
|
16409
|
+
if (!request) {
|
|
16410
|
+
return void 0;
|
|
16411
|
+
}
|
|
16412
|
+
const normalized = __spreadValues$5({}, request);
|
|
16413
|
+
return hasLayerRequestOptions(normalized) ? normalized : void 0;
|
|
16414
|
+
}
|
|
16415
|
+
function getLayerRequestOptions(options) {
|
|
16416
|
+
const request = options == null ? void 0 : options.request;
|
|
16417
|
+
const headers = __spreadValues$5(__spreadValues$5({}, (options == null ? void 0 : options.headers) || {}), (request == null ? void 0 : request.headers) || {});
|
|
16418
|
+
const result = {};
|
|
16419
|
+
if (hasHeaders(headers)) {
|
|
16420
|
+
result.headers = headers;
|
|
16421
|
+
}
|
|
16422
|
+
if (options == null ? void 0 : options.withCredentials) {
|
|
16423
|
+
result.credentials = "include";
|
|
16424
|
+
}
|
|
16425
|
+
if ((request == null ? void 0 : request.credentials) !== void 0) {
|
|
16426
|
+
result.credentials = request.credentials;
|
|
16427
|
+
}
|
|
16428
|
+
if ((request == null ? void 0 : request.cache) !== void 0) {
|
|
16429
|
+
result.cache = request.cache;
|
|
16430
|
+
}
|
|
16431
|
+
return normalizeLayerRequestOptions(result);
|
|
16432
|
+
}
|
|
16433
|
+
function hasLayerRequestOptions(request) {
|
|
16434
|
+
return !!(request && (hasHeaders(request.headers) || request.credentials !== void 0 || request.cache !== void 0 && request.cache !== "default"));
|
|
16435
|
+
}
|
|
16436
|
+
|
|
16389
16437
|
function callAjax({
|
|
16390
16438
|
src,
|
|
16391
16439
|
headers,
|
|
16392
|
-
withCredentials
|
|
16440
|
+
withCredentials,
|
|
16441
|
+
request
|
|
16393
16442
|
}) {
|
|
16394
|
-
|
|
16395
|
-
|
|
16396
|
-
|
|
16397
|
-
|
|
16398
|
-
|
|
16399
|
-
|
|
16400
|
-
|
|
16401
|
-
|
|
16443
|
+
const layerRequest = getLayerRequestOptions({
|
|
16444
|
+
headers,
|
|
16445
|
+
request,
|
|
16446
|
+
withCredentials
|
|
16447
|
+
});
|
|
16448
|
+
const requestHeaders = (layerRequest == null ? void 0 : layerRequest.headers) || {};
|
|
16449
|
+
const controller = new AbortController();
|
|
16450
|
+
const promise = fetch(src, {
|
|
16451
|
+
cache: layerRequest == null ? void 0 : layerRequest.cache,
|
|
16452
|
+
credentials: layerRequest == null ? void 0 : layerRequest.credentials,
|
|
16453
|
+
headers: requestHeaders,
|
|
16454
|
+
signal: controller.signal
|
|
16455
|
+
}).then((response) => {
|
|
16456
|
+
if (!response.ok) {
|
|
16457
|
+
throw new Error(response.statusText);
|
|
16402
16458
|
}
|
|
16403
|
-
|
|
16404
|
-
|
|
16459
|
+
return response.blob();
|
|
16460
|
+
}).then((blob) => {
|
|
16461
|
+
const urlCreator = window.URL || window.webkitURL;
|
|
16462
|
+
return urlCreator.createObjectURL(blob);
|
|
16463
|
+
}).catch((er) => {
|
|
16464
|
+
if (er.name === "AbortError") {
|
|
16465
|
+
return "";
|
|
16405
16466
|
}
|
|
16406
|
-
|
|
16407
|
-
const arrayBufferView = new Uint8Array(this.response);
|
|
16408
|
-
const blob = new Blob([arrayBufferView], { type: "image/png" });
|
|
16409
|
-
const urlCreator = window.URL || window.webkitURL;
|
|
16410
|
-
const imageUrl = urlCreator.createObjectURL(blob);
|
|
16411
|
-
resolve(imageUrl);
|
|
16412
|
-
};
|
|
16413
|
-
xhr.onerror = reject;
|
|
16414
|
-
xhr.send();
|
|
16415
|
-
abortFunc = () => {
|
|
16416
|
-
xhr.abort();
|
|
16417
|
-
resolve("");
|
|
16418
|
-
};
|
|
16467
|
+
throw er;
|
|
16419
16468
|
});
|
|
16469
|
+
const abortFunc = () => {
|
|
16470
|
+
controller.abort();
|
|
16471
|
+
};
|
|
16420
16472
|
return [promise, abortFunc];
|
|
16421
16473
|
}
|
|
16422
16474
|
|
|
@@ -16525,7 +16577,7 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
|
16525
16577
|
}
|
|
16526
16578
|
_initImage() {
|
|
16527
16579
|
super._initImage();
|
|
16528
|
-
const { headers, withCredentials } = this.options;
|
|
16580
|
+
const { headers, request, withCredentials } = this.options;
|
|
16529
16581
|
const img = this._image;
|
|
16530
16582
|
const src = img.src;
|
|
16531
16583
|
img.src = "";
|
|
@@ -16533,6 +16585,7 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
|
16533
16585
|
const [promise, abortFunc] = callAjax({
|
|
16534
16586
|
src,
|
|
16535
16587
|
headers,
|
|
16588
|
+
request,
|
|
16536
16589
|
withCredentials
|
|
16537
16590
|
});
|
|
16538
16591
|
promise.then((imgUrl) => {
|
|
@@ -16641,6 +16694,7 @@ class ImageLayer extends leafletSrcExports.Layer {
|
|
|
16641
16694
|
opacity: 0,
|
|
16642
16695
|
pane: this.options.pane,
|
|
16643
16696
|
headers: this.options.headers,
|
|
16697
|
+
request: this.options.request,
|
|
16644
16698
|
withCredentials: this.options.withCredentials
|
|
16645
16699
|
});
|
|
16646
16700
|
overlay.addTo(this._map);
|
|
@@ -16765,15 +16819,17 @@ class ImageAdapter extends BaseAdapter {
|
|
|
16765
16819
|
const url = options && options.url;
|
|
16766
16820
|
if (url) {
|
|
16767
16821
|
const updateWmsParamsFromOpt = options.updateWmsParams;
|
|
16768
|
-
|
|
16822
|
+
const request = getLayerRequestOptions(options);
|
|
16823
|
+
this.layer = new ImageLayer(url, __spreadProps$3(__spreadValues$4(__spreadValues$4(__spreadValues$4({
|
|
16769
16824
|
pane: this.pane,
|
|
16770
|
-
headers: options.headers,
|
|
16771
16825
|
setViewDelay: options.setViewDelay
|
|
16772
16826
|
}, __spreadProps$3(__spreadValues$4({
|
|
16773
16827
|
transparent: true
|
|
16774
16828
|
}, options), {
|
|
16775
16829
|
opacity: (_a = options.opacity) != null ? _a : void 0
|
|
16776
|
-
})), options.params), options.nativeOptions)
|
|
16830
|
+
})), options.params), options.nativeOptions), {
|
|
16831
|
+
request
|
|
16832
|
+
}));
|
|
16777
16833
|
if (updateWmsParamsFromOpt) {
|
|
16778
16834
|
const updateWmsParams = this.layer.updateWmsParams;
|
|
16779
16835
|
this.layer.updateWmsParams = function(map) {
|
|
@@ -16810,7 +16866,8 @@ function makeRemote(Base) {
|
|
|
16810
16866
|
const [promise, abortFunc] = callAjax({
|
|
16811
16867
|
src,
|
|
16812
16868
|
withCredentials: this.options.withCredentials,
|
|
16813
|
-
headers: this.options.headers
|
|
16869
|
+
headers: this.options.headers,
|
|
16870
|
+
request: this.options.request
|
|
16814
16871
|
});
|
|
16815
16872
|
promise.then((response) => {
|
|
16816
16873
|
tile.src = response;
|
|
@@ -16901,10 +16958,10 @@ class TileAdapter extends BaseAdapter {
|
|
|
16901
16958
|
tileLayerOptions.subdomains = opt.subdomains;
|
|
16902
16959
|
}
|
|
16903
16960
|
let layer;
|
|
16904
|
-
|
|
16961
|
+
const request = getLayerRequestOptions(opt);
|
|
16962
|
+
if (request) {
|
|
16905
16963
|
layer = new TileLayer(url, __spreadProps$2(__spreadValues$3({}, tileLayerOptions), {
|
|
16906
|
-
|
|
16907
|
-
withCredentials: opt.withCredentials,
|
|
16964
|
+
request,
|
|
16908
16965
|
setViewDelay: opt.setViewDelay
|
|
16909
16966
|
}));
|
|
16910
16967
|
} else {
|
|
@@ -17009,10 +17066,10 @@ class WmsAdapter extends BaseAdapter {
|
|
|
17009
17066
|
transparent: true
|
|
17010
17067
|
}, options.nativeOptions);
|
|
17011
17068
|
let layer;
|
|
17012
|
-
|
|
17069
|
+
const request = getLayerRequestOptions(opt);
|
|
17070
|
+
if (request) {
|
|
17013
17071
|
layer = new WmsLayer(url, __spreadProps(__spreadValues$1({}, layerOptions), {
|
|
17014
|
-
|
|
17015
|
-
withCredentials: opt.withCredentials
|
|
17072
|
+
request
|
|
17016
17073
|
}));
|
|
17017
17074
|
} else {
|
|
17018
17075
|
layer = new leafletSrcExports.TileLayer.WMS(url, layerOptions);
|