@nextgis/ngw-leaflet 1.11.0 → 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 -8
- 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 -8
- 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 +4 -4
|
@@ -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
|
|
|
@@ -15723,9 +15723,6 @@ var NgwLeaflet = (function () {
|
|
|
15723
15723
|
line: 'path',
|
|
15724
15724
|
point: 'circle',
|
|
15725
15725
|
};
|
|
15726
|
-
/**
|
|
15727
|
-
* @internal
|
|
15728
|
-
*/
|
|
15729
15726
|
var typeAlias$1 = {
|
|
15730
15727
|
Point: 'point',
|
|
15731
15728
|
LineString: 'line',
|
|
@@ -19151,6 +19148,13 @@ var NgwLeaflet = (function () {
|
|
|
19151
19148
|
}
|
|
19152
19149
|
});
|
|
19153
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
|
+
}
|
|
19154
19158
|
/** @deprecated use {@link fetchNgwExtent} instead */
|
|
19155
19159
|
function fetchNgwResourceExtent(item, connector) {
|
|
19156
19160
|
if (item.webmap) {
|
|
@@ -19547,7 +19551,7 @@ var NgwLeaflet = (function () {
|
|
|
19547
19551
|
hasData = this.getLayers && this.getLayers().length;
|
|
19548
19552
|
strategy = this.options.strategy;
|
|
19549
19553
|
if ((strategy === null || strategy === void 0 ? void 0 : strategy.startsWith('BBOX')) || hasData) {
|
|
19550
|
-
return [2 /*return*/,
|
|
19554
|
+
return [2 /*return*/, fetchNgwExtent({ connector: connector, resourceId: item.resource.id })];
|
|
19551
19555
|
}
|
|
19552
19556
|
else {
|
|
19553
19557
|
if (_super.prototype.getBounds) {
|
|
@@ -22294,9 +22298,9 @@ var NgwLeaflet = (function () {
|
|
|
22294
22298
|
*
|
|
22295
22299
|
* @example
|
|
22296
22300
|
* ```javascript
|
|
22297
|
-
* //
|
|
22301
|
+
* // Add raster layer resourceId is the style of 4004 layer
|
|
22298
22302
|
* ngwMap.addNgwLayer({ resource: 4005 });
|
|
22299
|
-
* //
|
|
22303
|
+
* // Add vector data from layer GEOJSON source
|
|
22300
22304
|
* ngwMap.addNgwLayer({
|
|
22301
22305
|
* resource: 4038,
|
|
22302
22306
|
* adapter: 'GEOJSON',
|
|
@@ -22482,7 +22486,7 @@ var NgwLeaflet = (function () {
|
|
|
22482
22486
|
*
|
|
22483
22487
|
* @example
|
|
22484
22488
|
* ```javascript
|
|
22485
|
-
* const ngwLayer = ngwMap.addNgwLayer({ id: 'ngw_layer_name',
|
|
22489
|
+
* const ngwLayer = ngwMap.addNgwLayer({ id: 'ngw_layer_name', resource: 4005 });
|
|
22486
22490
|
* ngwMap.fitLayer(ngwLayer);
|
|
22487
22491
|
* ngwMap.fitLayer('ngw_layer_name');
|
|
22488
22492
|
* ```
|