@nextgis/leaflet-map-adapter 2.2.2 → 2.3.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/lib/leaflet-map-adapter.esm-browser.js +26 -45
- 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 +25 -41
- 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 +26 -45
- 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 +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/leaflet-map-adapter; version: 2.
|
|
1
|
+
/** Bundle of @nextgis/leaflet-map-adapter; version: 2.3.0; author: NextGIS */
|
|
2
2
|
var domain;
|
|
3
3
|
|
|
4
4
|
// This constructor is used to store event handlers. Instantiating this is
|
|
@@ -14758,10 +14758,7 @@ function createFeaturePositionOptions(features) {
|
|
|
14758
14758
|
|
|
14759
14759
|
var __defProp$c = Object.defineProperty;
|
|
14760
14760
|
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14761
|
-
var __publicField$8 = (obj, key, value) =>
|
|
14762
|
-
__defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14763
|
-
return value;
|
|
14764
|
-
};
|
|
14761
|
+
var __publicField$8 = (obj, key, value) => __defNormalProp$c(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14765
14762
|
class BaseAdapter {
|
|
14766
14763
|
constructor(map, options) {
|
|
14767
14764
|
this.map = map;
|
|
@@ -14843,20 +14840,18 @@ var __spreadValues$7 = (a, b) => {
|
|
|
14843
14840
|
}
|
|
14844
14841
|
return a;
|
|
14845
14842
|
};
|
|
14846
|
-
var __publicField$7 = (obj, key, value) =>
|
|
14847
|
-
__defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14848
|
-
return value;
|
|
14849
|
-
};
|
|
14843
|
+
var __publicField$7 = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14850
14844
|
class GeoJsonEvents {
|
|
14851
14845
|
constructor(layer) {
|
|
14852
14846
|
__publicField$7(this, "layer");
|
|
14853
14847
|
__publicField$7(this, "_onclick");
|
|
14848
|
+
__publicField$7(this, "_ondblclick");
|
|
14854
14849
|
__publicField$7(this, "_mouseout");
|
|
14855
14850
|
__publicField$7(this, "_mouseover");
|
|
14856
14851
|
this.layer = layer;
|
|
14857
14852
|
}
|
|
14858
14853
|
handleMouseEvents(layer) {
|
|
14859
|
-
const { onClick, onLayerClick, onMouseOut, onMouseOver } = this.layer.options;
|
|
14854
|
+
const { onClick, onDoubleClick, onLayerClick, onMouseOut, onMouseOver } = this.layer.options;
|
|
14860
14855
|
const onClick_ = onClick || onLayerClick;
|
|
14861
14856
|
if (onClick_) {
|
|
14862
14857
|
this._onclick = (e) => {
|
|
@@ -14867,6 +14862,16 @@ class GeoJsonEvents {
|
|
|
14867
14862
|
};
|
|
14868
14863
|
layer.on("click", this._onclick, this);
|
|
14869
14864
|
}
|
|
14865
|
+
if (onDoubleClick) {
|
|
14866
|
+
this._ondblclick = (e) => {
|
|
14867
|
+
leafletSrcExports.DomEvent.stopPropagation(e);
|
|
14868
|
+
const selected = !!this.layer._getSelected(layer);
|
|
14869
|
+
onDoubleClick(__spreadValues$7({
|
|
14870
|
+
selected
|
|
14871
|
+
}, this._createMouseEvent(e)));
|
|
14872
|
+
};
|
|
14873
|
+
layer.on("dblclick", this._ondblclick, this);
|
|
14874
|
+
}
|
|
14870
14875
|
if (onMouseOut) {
|
|
14871
14876
|
this._mouseout = (e) => {
|
|
14872
14877
|
onMouseOut(this._createMouseEvent(e));
|
|
@@ -14943,10 +14948,7 @@ var __objRest$2 = (source, exclude) => {
|
|
|
14943
14948
|
}
|
|
14944
14949
|
return target;
|
|
14945
14950
|
};
|
|
14946
|
-
var __publicField$6 = (obj, key, value) =>
|
|
14947
|
-
__defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14948
|
-
return value;
|
|
14949
|
-
};
|
|
14951
|
+
var __publicField$6 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14950
14952
|
class GeoJsonPaint {
|
|
14951
14953
|
constructor(layer) {
|
|
14952
14954
|
__publicField$6(this, "layer");
|
|
@@ -15095,10 +15097,7 @@ var __spreadValues$5 = (a, b) => {
|
|
|
15095
15097
|
return a;
|
|
15096
15098
|
};
|
|
15097
15099
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
15098
|
-
var __publicField$5 = (obj, key, value) =>
|
|
15099
|
-
__defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15100
|
-
return value;
|
|
15101
|
-
};
|
|
15100
|
+
var __publicField$5 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15102
15101
|
var __async = (__this, __arguments, generator) => {
|
|
15103
15102
|
return new Promise((resolve, reject) => {
|
|
15104
15103
|
var fulfilled = (value) => {
|
|
@@ -15685,10 +15684,7 @@ function callAjax(src, headers) {
|
|
|
15685
15684
|
|
|
15686
15685
|
var __defProp$7 = Object.defineProperty;
|
|
15687
15686
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15688
|
-
var __publicField$4 = (obj, key, value) =>
|
|
15689
|
-
__defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15690
|
-
return value;
|
|
15691
|
-
};
|
|
15687
|
+
var __publicField$4 = (obj, key, value) => __defNormalProp$7(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15692
15688
|
class Queue {
|
|
15693
15689
|
/**
|
|
15694
15690
|
* @param {PromiseQueueOptions} options - Configuration options for the queue.
|
|
@@ -15774,14 +15770,10 @@ class Queue {
|
|
|
15774
15770
|
}
|
|
15775
15771
|
|
|
15776
15772
|
const imageQueue = new Queue({ concurrency: 6, delay: 200 });
|
|
15777
|
-
var imageQueue$1 = imageQueue;
|
|
15778
15773
|
|
|
15779
15774
|
var __defProp$6 = Object.defineProperty;
|
|
15780
15775
|
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15781
|
-
var __publicField$3 = (obj, key, value) =>
|
|
15782
|
-
__defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15783
|
-
return value;
|
|
15784
|
-
};
|
|
15776
|
+
var __publicField$3 = (obj, key, value) => __defNormalProp$6(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15785
15777
|
class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
15786
15778
|
constructor(imageUrl, bounds, options) {
|
|
15787
15779
|
super(imageUrl, bounds, options);
|
|
@@ -15799,7 +15791,7 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
|
15799
15791
|
const img = this._image;
|
|
15800
15792
|
const src = img.src;
|
|
15801
15793
|
img.src = "";
|
|
15802
|
-
imageQueue
|
|
15794
|
+
imageQueue.add(() => {
|
|
15803
15795
|
const [promise, abortFunc] = callAjax(src, headers);
|
|
15804
15796
|
promise.then((imgUrl) => {
|
|
15805
15797
|
img.src = imgUrl;
|
|
@@ -15812,10 +15804,7 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
|
15812
15804
|
|
|
15813
15805
|
var __defProp$5 = Object.defineProperty;
|
|
15814
15806
|
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15815
|
-
var __publicField$2 = (obj, key, value) =>
|
|
15816
|
-
__defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15817
|
-
return value;
|
|
15818
|
-
};
|
|
15807
|
+
var __publicField$2 = (obj, key, value) => __defNormalProp$5(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15819
15808
|
class ImageLayer extends leafletSrcExports.Layer {
|
|
15820
15809
|
constructor(url, options) {
|
|
15821
15810
|
super(options);
|
|
@@ -16019,10 +16008,7 @@ var __spreadValues$4 = (a, b) => {
|
|
|
16019
16008
|
}
|
|
16020
16009
|
return a;
|
|
16021
16010
|
};
|
|
16022
|
-
var __publicField$1 = (obj, key, value) =>
|
|
16023
|
-
__defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16024
|
-
return value;
|
|
16025
|
-
};
|
|
16011
|
+
var __publicField$1 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16026
16012
|
class ImageAdapter extends BaseAdapter {
|
|
16027
16013
|
constructor() {
|
|
16028
16014
|
super(...arguments);
|
|
@@ -16049,7 +16035,7 @@ class ImageAdapter extends BaseAdapter {
|
|
|
16049
16035
|
}
|
|
16050
16036
|
}
|
|
16051
16037
|
}
|
|
16052
|
-
__publicField$1(ImageAdapter, "queue", imageQueue
|
|
16038
|
+
__publicField$1(ImageAdapter, "queue", imageQueue);
|
|
16053
16039
|
|
|
16054
16040
|
function makeRemote(Base) {
|
|
16055
16041
|
return class RemoteTileLayer extends Base {
|
|
@@ -16300,10 +16286,7 @@ var __spreadValues = (a, b) => {
|
|
|
16300
16286
|
}
|
|
16301
16287
|
return a;
|
|
16302
16288
|
};
|
|
16303
|
-
var __publicField = (obj, key, value) =>
|
|
16304
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16305
|
-
return value;
|
|
16306
|
-
};
|
|
16289
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
16307
16290
|
const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
16308
16291
|
constructor() {
|
|
16309
16292
|
__publicField(this, "options", { target: "map" });
|
|
@@ -16381,8 +16364,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
16381
16364
|
}
|
|
16382
16365
|
setView(lngLatOrOpt, zoom) {
|
|
16383
16366
|
const map = this.map;
|
|
16384
|
-
if (!map)
|
|
16385
|
-
return;
|
|
16367
|
+
if (!map) return;
|
|
16386
16368
|
if (Array.isArray(lngLatOrOpt)) {
|
|
16387
16369
|
const lngLat = lngLatOrOpt;
|
|
16388
16370
|
const [lng, lat] = lngLat;
|
|
@@ -16450,8 +16432,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
16450
16432
|
return (_a = this.map && this.map.getZoom()) != null ? _a : void 0;
|
|
16451
16433
|
}
|
|
16452
16434
|
getBounds() {
|
|
16453
|
-
if (!this.map)
|
|
16454
|
-
return void 0;
|
|
16435
|
+
if (!this.map) return void 0;
|
|
16455
16436
|
const b = this.map.getBounds();
|
|
16456
16437
|
const sw = b.getSouthWest();
|
|
16457
16438
|
const ne = b.getNorthEast();
|