@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
|
function styleInject(css, ref) {
|
|
3
3
|
if ( ref === void 0 ) ref = {};
|
|
4
4
|
var insertAt = ref.insertAt;
|
|
@@ -18619,6 +18619,13 @@ function fetchNgwLayerItemExtent({ resourceId, featureId, connector, cache = tru
|
|
|
18619
18619
|
}
|
|
18620
18620
|
});
|
|
18621
18621
|
}
|
|
18622
|
+
function fetchNgwExtent(options) {
|
|
18623
|
+
return options.connector.getResource(options.resourceId).then((resource) => {
|
|
18624
|
+
if (resource) {
|
|
18625
|
+
return fetchNgwResourceExtent(resource, options.connector);
|
|
18626
|
+
}
|
|
18627
|
+
});
|
|
18628
|
+
}
|
|
18622
18629
|
/** @deprecated use {@link fetchNgwExtent} instead */
|
|
18623
18630
|
function fetchNgwResourceExtent(item, connector) {
|
|
18624
18631
|
if (item.webmap) {
|
|
@@ -18998,7 +19005,7 @@ async function createGeoJsonAdapter(props) {
|
|
|
18998
19005
|
const hasData = this.getLayers && this.getLayers().length;
|
|
18999
19006
|
const strategy = this.options.strategy;
|
|
19000
19007
|
if ((strategy === null || strategy === void 0 ? void 0 : strategy.startsWith('BBOX')) || hasData) {
|
|
19001
|
-
return
|
|
19008
|
+
return fetchNgwExtent({ connector, resourceId: item.resource.id });
|
|
19002
19009
|
}
|
|
19003
19010
|
else {
|
|
19004
19011
|
if (super.getBounds) {
|
|
@@ -21420,9 +21427,9 @@ class NgwMap extends WebMap {
|
|
|
21420
21427
|
*
|
|
21421
21428
|
* @example
|
|
21422
21429
|
* ```javascript
|
|
21423
|
-
* //
|
|
21430
|
+
* // Add raster layer resourceId is the style of 4004 layer
|
|
21424
21431
|
* ngwMap.addNgwLayer({ resource: 4005 });
|
|
21425
|
-
* //
|
|
21432
|
+
* // Add vector data from layer GEOJSON source
|
|
21426
21433
|
* ngwMap.addNgwLayer({
|
|
21427
21434
|
* resource: 4038,
|
|
21428
21435
|
* adapter: 'GEOJSON',
|
|
@@ -21581,7 +21588,7 @@ class NgwMap extends WebMap {
|
|
|
21581
21588
|
*
|
|
21582
21589
|
* @example
|
|
21583
21590
|
* ```javascript
|
|
21584
|
-
* const ngwLayer = ngwMap.addNgwLayer({ id: 'ngw_layer_name',
|
|
21591
|
+
* const ngwLayer = ngwMap.addNgwLayer({ id: 'ngw_layer_name', resource: 4005 });
|
|
21585
21592
|
* ngwMap.fitLayer(ngwLayer);
|
|
21586
21593
|
* ngwMap.fitLayer('ngw_layer_name');
|
|
21587
21594
|
* ```
|