@nextgis/ngw-leaflet 1.11.7 → 1.11.8
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 +12 -5
- 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 +12 -5
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +2 -2
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 1.11.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 1.11.8; author: NextGIS */
|
|
2
2
|
var NgwLeaflet = (function () {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -19148,6 +19148,13 @@ var NgwLeaflet = (function () {
|
|
|
19148
19148
|
}
|
|
19149
19149
|
});
|
|
19150
19150
|
}
|
|
19151
|
+
function fetchNgwExtent(options) {
|
|
19152
|
+
return options.connector.getResource(options.resourceId).then(function (resource) {
|
|
19153
|
+
if (resource) {
|
|
19154
|
+
return fetchNgwResourceExtent(resource, options.connector);
|
|
19155
|
+
}
|
|
19156
|
+
});
|
|
19157
|
+
}
|
|
19151
19158
|
/** @deprecated use {@link fetchNgwExtent} instead */
|
|
19152
19159
|
function fetchNgwResourceExtent(item, connector) {
|
|
19153
19160
|
if (item.webmap) {
|
|
@@ -19544,7 +19551,7 @@ var NgwLeaflet = (function () {
|
|
|
19544
19551
|
hasData = this.getLayers && this.getLayers().length;
|
|
19545
19552
|
strategy = this.options.strategy;
|
|
19546
19553
|
if ((strategy === null || strategy === void 0 ? void 0 : strategy.startsWith('BBOX')) || hasData) {
|
|
19547
|
-
return [2 /*return*/,
|
|
19554
|
+
return [2 /*return*/, fetchNgwExtent({ connector: connector, resourceId: item.resource.id })];
|
|
19548
19555
|
}
|
|
19549
19556
|
else {
|
|
19550
19557
|
if (_super.prototype.getBounds) {
|
|
@@ -22291,9 +22298,9 @@ var NgwLeaflet = (function () {
|
|
|
22291
22298
|
*
|
|
22292
22299
|
* @example
|
|
22293
22300
|
* ```javascript
|
|
22294
|
-
* //
|
|
22301
|
+
* // Add raster layer resourceId is the style of 4004 layer
|
|
22295
22302
|
* ngwMap.addNgwLayer({ resource: 4005 });
|
|
22296
|
-
* //
|
|
22303
|
+
* // Add vector data from layer GEOJSON source
|
|
22297
22304
|
* ngwMap.addNgwLayer({
|
|
22298
22305
|
* resource: 4038,
|
|
22299
22306
|
* adapter: 'GEOJSON',
|
|
@@ -22479,7 +22486,7 @@ var NgwLeaflet = (function () {
|
|
|
22479
22486
|
*
|
|
22480
22487
|
* @example
|
|
22481
22488
|
* ```javascript
|
|
22482
|
-
* const ngwLayer = ngwMap.addNgwLayer({ id: 'ngw_layer_name',
|
|
22489
|
+
* const ngwLayer = ngwMap.addNgwLayer({ id: 'ngw_layer_name', resource: 4005 });
|
|
22483
22490
|
* ngwMap.fitLayer(ngwLayer);
|
|
22484
22491
|
* ngwMap.fitLayer('ngw_layer_name');
|
|
22485
22492
|
* ```
|