@nextgis/leaflet-map-adapter 2.2.0 → 2.2.1
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 +187 -85
- 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 +52 -39
- 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 +187 -85
- 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 +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/leaflet-map-adapter; version: 2.2.
|
|
1
|
+
/** Bundle of @nextgis/leaflet-map-adapter; version: 2.2.1; author: NextGIS */
|
|
2
2
|
var domain;
|
|
3
3
|
|
|
4
4
|
// This constructor is used to store event handlers. Instantiating this is
|
|
@@ -14756,18 +14756,18 @@ function createFeaturePositionOptions(features) {
|
|
|
14756
14756
|
};
|
|
14757
14757
|
}
|
|
14758
14758
|
|
|
14759
|
-
var __defProp$
|
|
14760
|
-
var __defNormalProp$
|
|
14761
|
-
var __publicField$
|
|
14762
|
-
__defNormalProp$
|
|
14759
|
+
var __defProp$c = Object.defineProperty;
|
|
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
14763
|
return value;
|
|
14764
14764
|
};
|
|
14765
14765
|
class BaseAdapter {
|
|
14766
14766
|
constructor(map, options) {
|
|
14767
14767
|
this.map = map;
|
|
14768
14768
|
this.options = options;
|
|
14769
|
-
__publicField$
|
|
14770
|
-
__publicField$
|
|
14769
|
+
__publicField$8(this, "layer");
|
|
14770
|
+
__publicField$8(this, "pane", "order-0");
|
|
14771
14771
|
if (options.order !== void 0) {
|
|
14772
14772
|
const pane = "order-" + options.order;
|
|
14773
14773
|
let exist = map.getPane(pane);
|
|
@@ -14796,19 +14796,19 @@ function convertMapClickEvent(evt) {
|
|
|
14796
14796
|
};
|
|
14797
14797
|
}
|
|
14798
14798
|
|
|
14799
|
-
var __defProp$
|
|
14799
|
+
var __defProp$b = Object.defineProperty;
|
|
14800
14800
|
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
14801
14801
|
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
14802
14802
|
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
14803
|
-
var __defNormalProp$
|
|
14803
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14804
14804
|
var __spreadValues$8 = (a, b) => {
|
|
14805
14805
|
for (var prop in b || (b = {}))
|
|
14806
14806
|
if (__hasOwnProp$8.call(b, prop))
|
|
14807
|
-
__defNormalProp$
|
|
14807
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
14808
14808
|
if (__getOwnPropSymbols$8)
|
|
14809
14809
|
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
14810
14810
|
if (__propIsEnum$8.call(b, prop))
|
|
14811
|
-
__defNormalProp$
|
|
14811
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
14812
14812
|
}
|
|
14813
14813
|
return a;
|
|
14814
14814
|
};
|
|
@@ -14827,32 +14827,32 @@ function createMouseEvent({
|
|
|
14827
14827
|
return opt;
|
|
14828
14828
|
}
|
|
14829
14829
|
|
|
14830
|
-
var __defProp$
|
|
14830
|
+
var __defProp$a = Object.defineProperty;
|
|
14831
14831
|
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
14832
14832
|
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
14833
14833
|
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
14834
|
-
var __defNormalProp$
|
|
14834
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14835
14835
|
var __spreadValues$7 = (a, b) => {
|
|
14836
14836
|
for (var prop in b || (b = {}))
|
|
14837
14837
|
if (__hasOwnProp$7.call(b, prop))
|
|
14838
|
-
__defNormalProp$
|
|
14838
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
14839
14839
|
if (__getOwnPropSymbols$7)
|
|
14840
14840
|
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
14841
14841
|
if (__propIsEnum$7.call(b, prop))
|
|
14842
|
-
__defNormalProp$
|
|
14842
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
14843
14843
|
}
|
|
14844
14844
|
return a;
|
|
14845
14845
|
};
|
|
14846
|
-
var __publicField$
|
|
14847
|
-
__defNormalProp$
|
|
14846
|
+
var __publicField$7 = (obj, key, value) => {
|
|
14847
|
+
__defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14848
14848
|
return value;
|
|
14849
14849
|
};
|
|
14850
14850
|
class GeoJsonEvents {
|
|
14851
14851
|
constructor(layer) {
|
|
14852
|
-
__publicField$
|
|
14853
|
-
__publicField$
|
|
14854
|
-
__publicField$
|
|
14855
|
-
__publicField$
|
|
14852
|
+
__publicField$7(this, "layer");
|
|
14853
|
+
__publicField$7(this, "_onclick");
|
|
14854
|
+
__publicField$7(this, "_mouseout");
|
|
14855
|
+
__publicField$7(this, "_mouseover");
|
|
14856
14856
|
this.layer = layer;
|
|
14857
14857
|
}
|
|
14858
14858
|
handleMouseEvents(layer) {
|
|
@@ -14912,21 +14912,21 @@ function isPaintCallback(paint) {
|
|
|
14912
14912
|
return false;
|
|
14913
14913
|
}
|
|
14914
14914
|
|
|
14915
|
-
var __defProp$
|
|
14915
|
+
var __defProp$9 = Object.defineProperty;
|
|
14916
14916
|
var __defProps$4 = Object.defineProperties;
|
|
14917
14917
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
14918
14918
|
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
14919
14919
|
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
14920
14920
|
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
14921
|
-
var __defNormalProp$
|
|
14921
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14922
14922
|
var __spreadValues$6 = (a, b) => {
|
|
14923
14923
|
for (var prop in b || (b = {}))
|
|
14924
14924
|
if (__hasOwnProp$6.call(b, prop))
|
|
14925
|
-
__defNormalProp$
|
|
14925
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
14926
14926
|
if (__getOwnPropSymbols$6)
|
|
14927
14927
|
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
14928
14928
|
if (__propIsEnum$6.call(b, prop))
|
|
14929
|
-
__defNormalProp$
|
|
14929
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
14930
14930
|
}
|
|
14931
14931
|
return a;
|
|
14932
14932
|
};
|
|
@@ -14943,13 +14943,13 @@ var __objRest$2 = (source, exclude) => {
|
|
|
14943
14943
|
}
|
|
14944
14944
|
return target;
|
|
14945
14945
|
};
|
|
14946
|
-
var __publicField$
|
|
14947
|
-
__defNormalProp$
|
|
14946
|
+
var __publicField$6 = (obj, key, value) => {
|
|
14947
|
+
__defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
14948
14948
|
return value;
|
|
14949
14949
|
};
|
|
14950
14950
|
class GeoJsonPaint {
|
|
14951
14951
|
constructor(layer) {
|
|
14952
|
-
__publicField$
|
|
14952
|
+
__publicField$6(this, "layer");
|
|
14953
14953
|
this.layer = layer;
|
|
14954
14954
|
}
|
|
14955
14955
|
setPaintEachLayer(paint) {
|
|
@@ -15076,27 +15076,27 @@ class GeoJsonPaint {
|
|
|
15076
15076
|
}
|
|
15077
15077
|
}
|
|
15078
15078
|
|
|
15079
|
-
var __defProp$
|
|
15079
|
+
var __defProp$8 = Object.defineProperty;
|
|
15080
15080
|
var __defProps$3 = Object.defineProperties;
|
|
15081
15081
|
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
15082
15082
|
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
15083
15083
|
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
15084
15084
|
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
15085
|
-
var __defNormalProp$
|
|
15085
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15086
15086
|
var __spreadValues$5 = (a, b) => {
|
|
15087
15087
|
for (var prop in b || (b = {}))
|
|
15088
15088
|
if (__hasOwnProp$5.call(b, prop))
|
|
15089
|
-
__defNormalProp$
|
|
15089
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
15090
15090
|
if (__getOwnPropSymbols$5)
|
|
15091
15091
|
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
15092
15092
|
if (__propIsEnum$5.call(b, prop))
|
|
15093
|
-
__defNormalProp$
|
|
15093
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
15094
15094
|
}
|
|
15095
15095
|
return a;
|
|
15096
15096
|
};
|
|
15097
15097
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
15098
|
-
var __publicField$
|
|
15099
|
-
__defNormalProp$
|
|
15098
|
+
var __publicField$5 = (obj, key, value) => {
|
|
15099
|
+
__defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
15100
15100
|
return value;
|
|
15101
15101
|
};
|
|
15102
15102
|
var __async = (__this, __arguments, generator) => {
|
|
@@ -15122,22 +15122,22 @@ var __async = (__this, __arguments, generator) => {
|
|
|
15122
15122
|
class GeoJsonAdapter extends BaseAdapter {
|
|
15123
15123
|
constructor(map, options) {
|
|
15124
15124
|
super(map, options);
|
|
15125
|
-
__publicField$
|
|
15126
|
-
__publicField$
|
|
15127
|
-
__publicField$
|
|
15128
|
-
__publicField$
|
|
15129
|
-
__publicField$
|
|
15130
|
-
__publicField$
|
|
15131
|
-
__publicField$
|
|
15132
|
-
__publicField$
|
|
15133
|
-
__publicField$
|
|
15134
|
-
__publicField$
|
|
15135
|
-
__publicField$
|
|
15136
|
-
__publicField$
|
|
15137
|
-
__publicField$
|
|
15125
|
+
__publicField$5(this, "layer");
|
|
15126
|
+
__publicField$5(this, "selected", false);
|
|
15127
|
+
__publicField$5(this, "type");
|
|
15128
|
+
__publicField$5(this, "_layers", []);
|
|
15129
|
+
__publicField$5(this, "_events");
|
|
15130
|
+
__publicField$5(this, "paint");
|
|
15131
|
+
__publicField$5(this, "selectedPaint");
|
|
15132
|
+
__publicField$5(this, "_selectedLayers", []);
|
|
15133
|
+
__publicField$5(this, "_filteredLayers", []);
|
|
15134
|
+
__publicField$5(this, "_filterFun");
|
|
15135
|
+
__publicField$5(this, "_openedPopup", []);
|
|
15136
|
+
__publicField$5(this, "_paint");
|
|
15137
|
+
__publicField$5(this, "$updateTooltip", debounce(() => {
|
|
15138
15138
|
this.updateTooltip();
|
|
15139
15139
|
}, 300));
|
|
15140
|
-
__publicField$
|
|
15140
|
+
__publicField$5(this, "$unselect", () => {
|
|
15141
15141
|
this.unselect();
|
|
15142
15142
|
});
|
|
15143
15143
|
this._events = new GeoJsonEvents(this);
|
|
@@ -15656,26 +15656,126 @@ class GeoJsonAdapter extends BaseAdapter {
|
|
|
15656
15656
|
}
|
|
15657
15657
|
}
|
|
15658
15658
|
|
|
15659
|
-
function callAjax(src,
|
|
15660
|
-
|
|
15661
|
-
xhr.open("GET", src);
|
|
15662
|
-
xhr.responseType = "arraybuffer";
|
|
15663
|
-
for (const h in headers) {
|
|
15664
|
-
xhr.setRequestHeader(h, headers[h]);
|
|
15665
|
-
}
|
|
15666
|
-
xhr.onload = function() {
|
|
15667
|
-
const arrayBufferView = new Uint8Array(this.response);
|
|
15668
|
-
const blob = new Blob([arrayBufferView], { type: "image/png" });
|
|
15669
|
-
const urlCreator = window.URL || window.webkitURL;
|
|
15670
|
-
const imageUrl = urlCreator.createObjectURL(blob);
|
|
15671
|
-
callback(imageUrl);
|
|
15672
|
-
};
|
|
15673
|
-
xhr.send();
|
|
15674
|
-
return () => {
|
|
15675
|
-
xhr.abort();
|
|
15659
|
+
function callAjax(src, headers) {
|
|
15660
|
+
let abortFunc = () => {
|
|
15676
15661
|
};
|
|
15662
|
+
const promise = new Promise((resolve, reject) => {
|
|
15663
|
+
const xhr = new XMLHttpRequest();
|
|
15664
|
+
xhr.open("GET", src);
|
|
15665
|
+
xhr.responseType = "arraybuffer";
|
|
15666
|
+
for (const h in headers) {
|
|
15667
|
+
xhr.setRequestHeader(h, headers[h]);
|
|
15668
|
+
}
|
|
15669
|
+
xhr.onload = function() {
|
|
15670
|
+
const arrayBufferView = new Uint8Array(this.response);
|
|
15671
|
+
const blob = new Blob([arrayBufferView], { type: "image/png" });
|
|
15672
|
+
const urlCreator = window.URL || window.webkitURL;
|
|
15673
|
+
const imageUrl = urlCreator.createObjectURL(blob);
|
|
15674
|
+
resolve(imageUrl);
|
|
15675
|
+
};
|
|
15676
|
+
xhr.onerror = reject;
|
|
15677
|
+
xhr.send();
|
|
15678
|
+
abortFunc = () => {
|
|
15679
|
+
xhr.abort();
|
|
15680
|
+
resolve("");
|
|
15681
|
+
};
|
|
15682
|
+
});
|
|
15683
|
+
return [promise, abortFunc];
|
|
15677
15684
|
}
|
|
15678
15685
|
|
|
15686
|
+
var __defProp$7 = Object.defineProperty;
|
|
15687
|
+
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
|
+
};
|
|
15692
|
+
class Queue {
|
|
15693
|
+
/**
|
|
15694
|
+
* @param {PromiseQueueOptions} options - Configuration options for the queue.
|
|
15695
|
+
*/
|
|
15696
|
+
constructor({ concurrency = 1, delay = 0 } = {}) {
|
|
15697
|
+
__publicField$4(this, "queue", []);
|
|
15698
|
+
__publicField$4(this, "concurrency");
|
|
15699
|
+
__publicField$4(this, "activeCount", 0);
|
|
15700
|
+
__publicField$4(this, "timeoutId");
|
|
15701
|
+
__publicField$4(this, "delay");
|
|
15702
|
+
__publicField$4(this, "toAbort", []);
|
|
15703
|
+
this.concurrency = concurrency;
|
|
15704
|
+
this.delay = delay;
|
|
15705
|
+
}
|
|
15706
|
+
/**
|
|
15707
|
+
* Adds a task to the queue, which can be either a simple asynchronous function or an array containing a function and its abort handler.
|
|
15708
|
+
*
|
|
15709
|
+
* @param {PromiseFuncOrPromiseWithAbortArray} promise - The asynchronous task function or a tuple containing the task and an abort function.
|
|
15710
|
+
* @param {Abort} [abort] - An optional abort function for the task.
|
|
15711
|
+
*
|
|
15712
|
+
* @example
|
|
15713
|
+
* ```javascript
|
|
15714
|
+
* // Add a task without an abort function.
|
|
15715
|
+
* queue.add(() => new Promise(resolve => setTimeout(resolve, 1000)));
|
|
15716
|
+
*
|
|
15717
|
+
* // Add a task with an abort function.
|
|
15718
|
+
* const controller = new AbortController();
|
|
15719
|
+
* queue.add(() => fetch('https://example.com', { signal: controller.signal }), controller.abort);
|
|
15720
|
+
* ```
|
|
15721
|
+
*/
|
|
15722
|
+
add(promise, abort) {
|
|
15723
|
+
this.queue.push({ promise, abort });
|
|
15724
|
+
this.debouncedNext();
|
|
15725
|
+
}
|
|
15726
|
+
/**
|
|
15727
|
+
* Aborts all tasks in the queue that have an abort function.
|
|
15728
|
+
*
|
|
15729
|
+
* @example
|
|
15730
|
+
* queue.abort(); // Aborts all abortable tasks in the queue.
|
|
15731
|
+
*/
|
|
15732
|
+
abort() {
|
|
15733
|
+
for (const abort of this.toAbort) {
|
|
15734
|
+
abort();
|
|
15735
|
+
}
|
|
15736
|
+
this.toAbort = [];
|
|
15737
|
+
this.queue = [];
|
|
15738
|
+
this._clearTimeout();
|
|
15739
|
+
}
|
|
15740
|
+
debouncedNext() {
|
|
15741
|
+
this._clearTimeout();
|
|
15742
|
+
this.timeoutId = setTimeout(() => this._next(), this.delay);
|
|
15743
|
+
}
|
|
15744
|
+
_clearTimeout() {
|
|
15745
|
+
if (this.timeoutId) {
|
|
15746
|
+
clearTimeout(this.timeoutId);
|
|
15747
|
+
}
|
|
15748
|
+
}
|
|
15749
|
+
_next() {
|
|
15750
|
+
while (this.activeCount < this.concurrency && this.queue.length > 0) {
|
|
15751
|
+
const { promise, abort } = this.queue.shift();
|
|
15752
|
+
this.activeCount++;
|
|
15753
|
+
let toAbort = abort;
|
|
15754
|
+
let request;
|
|
15755
|
+
const execute = promise();
|
|
15756
|
+
if (Array.isArray(execute)) {
|
|
15757
|
+
request = execute[0];
|
|
15758
|
+
toAbort = execute[1];
|
|
15759
|
+
} else {
|
|
15760
|
+
request = execute;
|
|
15761
|
+
}
|
|
15762
|
+
if (toAbort) {
|
|
15763
|
+
this.toAbort.push(toAbort);
|
|
15764
|
+
}
|
|
15765
|
+
request.finally(() => {
|
|
15766
|
+
this.activeCount--;
|
|
15767
|
+
if (toAbort) {
|
|
15768
|
+
this.toAbort = this.toAbort.filter((a) => a !== toAbort);
|
|
15769
|
+
}
|
|
15770
|
+
this.debouncedNext();
|
|
15771
|
+
});
|
|
15772
|
+
}
|
|
15773
|
+
}
|
|
15774
|
+
}
|
|
15775
|
+
|
|
15776
|
+
const imageQueue = new Queue({ concurrency: 6, delay: 200 });
|
|
15777
|
+
var imageQueue$1 = imageQueue;
|
|
15778
|
+
|
|
15679
15779
|
var __defProp$6 = Object.defineProperty;
|
|
15680
15780
|
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15681
15781
|
var __publicField$3 = (obj, key, value) => {
|
|
@@ -15697,21 +15797,15 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
|
|
|
15697
15797
|
super._initImage();
|
|
15698
15798
|
const headers = this.options.headers;
|
|
15699
15799
|
const img = this._image;
|
|
15700
|
-
|
|
15701
|
-
|
|
15702
|
-
img.src
|
|
15703
|
-
|
|
15704
|
-
src
|
|
15705
|
-
|
|
15706
|
-
|
|
15707
|
-
|
|
15708
|
-
|
|
15709
|
-
);
|
|
15710
|
-
} else {
|
|
15711
|
-
this._aborter = () => {
|
|
15712
|
-
img.setAttribute("src", leafletSrcExports.Util.emptyImageUrl);
|
|
15713
|
-
};
|
|
15714
|
-
}
|
|
15800
|
+
img.src = "";
|
|
15801
|
+
imageQueue$1.add(() => {
|
|
15802
|
+
const [promise, abortFunc] = callAjax(img.src, headers);
|
|
15803
|
+
promise.then((imgUrl) => {
|
|
15804
|
+
img.src = imgUrl;
|
|
15805
|
+
});
|
|
15806
|
+
this._aborter = abortFunc;
|
|
15807
|
+
return promise;
|
|
15808
|
+
});
|
|
15715
15809
|
}
|
|
15716
15810
|
}
|
|
15717
15811
|
|
|
@@ -15954,6 +16048,7 @@ class ImageAdapter extends BaseAdapter {
|
|
|
15954
16048
|
}
|
|
15955
16049
|
}
|
|
15956
16050
|
}
|
|
16051
|
+
__publicField$1(ImageAdapter, "queue", imageQueue$1);
|
|
15957
16052
|
|
|
15958
16053
|
function makeRemote(Base) {
|
|
15959
16054
|
return class RemoteTileLayer extends Base {
|
|
@@ -15968,15 +16063,16 @@ function makeRemote(Base) {
|
|
|
15968
16063
|
createTile(coords, done) {
|
|
15969
16064
|
const url = this.getTileUrl(coords);
|
|
15970
16065
|
const tile = document.createElement("img");
|
|
15971
|
-
|
|
16066
|
+
const [promise, abortFunc] = callAjax(
|
|
15972
16067
|
url,
|
|
15973
|
-
(response) => {
|
|
15974
|
-
tile.src = response;
|
|
15975
|
-
done(null, tile);
|
|
15976
|
-
},
|
|
15977
16068
|
// @ts-ignore
|
|
15978
16069
|
this.options.headers
|
|
15979
16070
|
);
|
|
16071
|
+
promise.then((response) => {
|
|
16072
|
+
tile.src = response;
|
|
16073
|
+
done(null, tile);
|
|
16074
|
+
});
|
|
16075
|
+
tile.abort = abortFunc;
|
|
15980
16076
|
if (this.options.crossOrigin || this.options.crossOrigin === "") {
|
|
15981
16077
|
tile.crossOrigin = this.options.crossOrigin === true ? "" : this.options.crossOrigin;
|
|
15982
16078
|
}
|
|
@@ -16485,6 +16581,12 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
16485
16581
|
for (const e of this._universalEvents) {
|
|
16486
16582
|
map.on(e, () => this.emitter.emit(e, this), map);
|
|
16487
16583
|
}
|
|
16584
|
+
map.on("movestart", () => {
|
|
16585
|
+
ImageAdapter.queue.abort();
|
|
16586
|
+
});
|
|
16587
|
+
map.on("zoomstart", () => {
|
|
16588
|
+
ImageAdapter.queue.abort();
|
|
16589
|
+
});
|
|
16488
16590
|
for (const e of this._positionEvents) {
|
|
16489
16591
|
map.on(
|
|
16490
16592
|
e,
|