@nextgis/ngw-leaflet 1.13.8 → 1.14.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/ngw-leaflet.esm-browser.js +27 -34
- package/lib/ngw-leaflet.esm-browser.js.map +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.js +1 -1
- package/lib/ngw-leaflet.global.js +27 -34
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +1 -1
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 1.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 1.14.0; author: NextGIS */
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -15952,7 +15952,7 @@ function clearObject(obj) {
|
|
|
15952
15952
|
var ID$2 = 0;
|
|
15953
15953
|
var OPTIONS$1 = {
|
|
15954
15954
|
minZoom: 0,
|
|
15955
|
-
maxZoom:
|
|
15955
|
+
maxZoom: 22,
|
|
15956
15956
|
paint: {
|
|
15957
15957
|
color: '#0000ff',
|
|
15958
15958
|
opacity: 0.4,
|
|
@@ -19956,7 +19956,7 @@ function ngwApiToAdapterOptions(_a) {
|
|
|
19956
19956
|
'resource=' +
|
|
19957
19957
|
resourceId +
|
|
19958
19958
|
'&simplification=' +
|
|
19959
|
-
((_b = options.simplification) !== null && _b !== void 0 ? _b :
|
|
19959
|
+
((_b = options.simplification) !== null && _b !== void 0 ? _b : 6);
|
|
19960
19960
|
// url = baseUrl + '/api/resource/' + options.resourceId + '/{z}/{x}/{y}.mvt';
|
|
19961
19961
|
return {
|
|
19962
19962
|
url: url,
|
|
@@ -20035,29 +20035,13 @@ function createRasterAdapter(_a) {
|
|
|
20035
20035
|
baseUrl: connector.options.baseUrl || '',
|
|
20036
20036
|
});
|
|
20037
20037
|
if (opt) {
|
|
20038
|
-
var layerAdapterOptions = __assign(__assign(__assign({}, opt), layerOptions.adapterOptions), { params: { resource: resourceId_1 },
|
|
20039
|
-
// @deprecated
|
|
20040
|
-
layers: String(resourceId_1), resourceId: resourceId_1 });
|
|
20038
|
+
var layerAdapterOptions = __assign(__assign(__assign({}, opt), layerOptions.adapterOptions), { params: { resource: resourceId_1 }, layers: opt.layers || String(resourceId_1), resourceId: resourceId_1 });
|
|
20041
20039
|
if (layerOptions.adapterOptions &&
|
|
20042
20040
|
defined(layerOptions.adapterOptions.setViewDelay)) {
|
|
20043
20041
|
layerAdapterOptions.setViewDelay =
|
|
20044
20042
|
layerOptions.adapterOptions.setViewDelay;
|
|
20045
20043
|
}
|
|
20046
20044
|
_this.options = __assign(__assign({}, _this.options), layerAdapterOptions);
|
|
20047
|
-
// if (true) {
|
|
20048
|
-
// Object.defineProperty(this.options, 'layers', {
|
|
20049
|
-
// get: () => {
|
|
20050
|
-
// console.warn('Do not use `layers` in ImageAdapterOptions');
|
|
20051
|
-
// return String(resourceId);
|
|
20052
|
-
// },
|
|
20053
|
-
// });
|
|
20054
|
-
// Object.defineProperty(this.options, 'resourceId', {
|
|
20055
|
-
// get: () => {
|
|
20056
|
-
// console.warn('Do not use `resourceId` in ImageAdapterOptions');
|
|
20057
|
-
// return resourceId;
|
|
20058
|
-
// },
|
|
20059
|
-
// });
|
|
20060
|
-
// }
|
|
20061
20045
|
}
|
|
20062
20046
|
return _this;
|
|
20063
20047
|
}
|
|
@@ -22728,13 +22712,14 @@ var NgwMap = /** @class */ (function (_super) {
|
|
|
22728
22712
|
var _this = this;
|
|
22729
22713
|
if (!this.$$selectFromNgwRaster) {
|
|
22730
22714
|
this.$$selectFromNgwRaster = function (ev) {
|
|
22731
|
-
var count = _this.
|
|
22715
|
+
var count = _this._getSelectListenersCount();
|
|
22732
22716
|
if (count) {
|
|
22733
22717
|
_this._selectFromNgwRaster(ev);
|
|
22734
22718
|
}
|
|
22735
22719
|
};
|
|
22736
22720
|
this.$$selectFromNgwVector = function (ev) {
|
|
22737
|
-
|
|
22721
|
+
var count = _this._getSelectListenersCount();
|
|
22722
|
+
if (count) {
|
|
22738
22723
|
_this._selectFromNgwVector(ev);
|
|
22739
22724
|
}
|
|
22740
22725
|
};
|
|
@@ -22745,8 +22730,10 @@ var NgwMap = /** @class */ (function (_super) {
|
|
|
22745
22730
|
NgwMap.prototype.disableSelection = function () {
|
|
22746
22731
|
if (this.$$selectFromNgwRaster) {
|
|
22747
22732
|
this.emitter.removeListener('click', this.$$selectFromNgwRaster);
|
|
22748
|
-
this.emitter.removeListener('click', this._selectFromNgwVector);
|
|
22749
22733
|
this.$$selectFromNgwRaster = undefined;
|
|
22734
|
+
}
|
|
22735
|
+
if (this.$$selectFromNgwVector) {
|
|
22736
|
+
this.emitter.removeListener('layer:click', this.$$selectFromNgwVector);
|
|
22750
22737
|
this.$$selectFromNgwVector = undefined;
|
|
22751
22738
|
}
|
|
22752
22739
|
};
|
|
@@ -22902,7 +22889,11 @@ var NgwMap = /** @class */ (function (_super) {
|
|
|
22902
22889
|
NgwMap.prototype._selectFromNgwVector = function (ev) {
|
|
22903
22890
|
var _a;
|
|
22904
22891
|
var layer = ev.layer;
|
|
22905
|
-
|
|
22892
|
+
var selectable = layer.options.selectable && this.isLayerVisible(layer);
|
|
22893
|
+
if (!selectable) {
|
|
22894
|
+
return undefined;
|
|
22895
|
+
}
|
|
22896
|
+
// Item property means layer is NgwResource
|
|
22906
22897
|
var id = layer.item && layer.item.resource.id;
|
|
22907
22898
|
var feature = ev.feature;
|
|
22908
22899
|
if (id !== undefined && feature) {
|
|
@@ -22932,10 +22923,10 @@ var NgwMap = /** @class */ (function (_super) {
|
|
|
22932
22923
|
};
|
|
22933
22924
|
NgwMap.prototype._selectFromNgwRaster = function (ev) {
|
|
22934
22925
|
return __awaiter(this, void 0, void 0, function () {
|
|
22935
|
-
var promises, layers, _i, layers_1, l, layer, identFunc, getIdsPromise, getIds, ids, pixelRadius, center, zoom, radius, selectPromise;
|
|
22926
|
+
var promises, layers, _i, layers_1, l, layer, identFunc, getIdsPromise, getIds, ids, _a, getIds_1, x, pixelRadius, center, zoom, radius, selectPromise;
|
|
22936
22927
|
var _this = this;
|
|
22937
|
-
return __generator(this, function (
|
|
22938
|
-
switch (
|
|
22928
|
+
return __generator(this, function (_b) {
|
|
22929
|
+
switch (_b.label) {
|
|
22939
22930
|
case 0:
|
|
22940
22931
|
this._emitStatusEvent('ngw:preselect');
|
|
22941
22932
|
promises = [];
|
|
@@ -22959,13 +22950,14 @@ var NgwMap = /** @class */ (function (_super) {
|
|
|
22959
22950
|
getIdsPromise = Promise.all(promises);
|
|
22960
22951
|
return [4 /*yield*/, getIdsPromise];
|
|
22961
22952
|
case 1:
|
|
22962
|
-
getIds =
|
|
22953
|
+
getIds = _b.sent();
|
|
22963
22954
|
ids = [];
|
|
22964
|
-
getIds.
|
|
22955
|
+
for (_a = 0, getIds_1 = getIds; _a < getIds_1.length; _a++) {
|
|
22956
|
+
x = getIds_1[_a];
|
|
22965
22957
|
if (x) {
|
|
22966
|
-
|
|
22958
|
+
ids.push.apply(ids, x);
|
|
22967
22959
|
}
|
|
22968
|
-
}
|
|
22960
|
+
}
|
|
22969
22961
|
if (!ids.length) {
|
|
22970
22962
|
this._emitStatusEvent('ngw:select', null);
|
|
22971
22963
|
return [2 /*return*/];
|
|
@@ -23005,6 +22997,9 @@ var NgwMap = /** @class */ (function (_super) {
|
|
|
23005
22997
|
};
|
|
23006
22998
|
return __assign(__assign({}, identify), { getIdentifyItems: getIdentifyItems_ });
|
|
23007
22999
|
};
|
|
23000
|
+
NgwMap.prototype._getSelectListenersCount = function () {
|
|
23001
|
+
return this.emitter.listenerCount('ngw:select');
|
|
23002
|
+
};
|
|
23008
23003
|
NgwMap.prototype._whiteLabel = function () {
|
|
23009
23004
|
return __awaiter(this, void 0, void 0, function () {
|
|
23010
23005
|
var container, logo;
|
|
@@ -23992,7 +23987,6 @@ var ImageLayer = /** @class */ (function (_super) {
|
|
|
23992
23987
|
opacity: 1,
|
|
23993
23988
|
isBack: false,
|
|
23994
23989
|
minZoom: 0,
|
|
23995
|
-
maxZoom: 18,
|
|
23996
23990
|
pane: 'tilePane',
|
|
23997
23991
|
headers: null,
|
|
23998
23992
|
viewPortBuffer: 0,
|
|
@@ -24297,8 +24291,7 @@ var WmsLayerBase = /** @class */ (function (_super) {
|
|
|
24297
24291
|
}
|
|
24298
24292
|
return WmsLayerBase;
|
|
24299
24293
|
}(leafletSrc.exports.TileLayer.WMS));
|
|
24300
|
-
var WmsLayer = makeRemote(WmsLayerBase);
|
|
24301
|
-
// applyMixins(WmsLayer, [RemoteTileLayer]);
|
|
24294
|
+
var WmsLayer = makeRemote(WmsLayerBase);
|
|
24302
24295
|
|
|
24303
24296
|
var WmsAdapter = /** @class */ (function (_super) {
|
|
24304
24297
|
__extends(WmsAdapter, _super);
|