@nextgis/ngw-map 1.16.6 → 1.16.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/index.d.ts +6 -7
- package/lib/ngw-map.cjs.js +8 -8
- package/lib/ngw-map.cjs.js.map +1 -1
- package/lib/ngw-map.cjs.prod.js +1 -1
- package/lib/ngw-map.cjs.prod.js.map +1 -1
- package/lib/ngw-map.esm-browser.js +64 -31
- package/lib/ngw-map.esm-browser.js.map +1 -1
- package/lib/ngw-map.esm-browser.prod.js +1 -1
- package/lib/ngw-map.esm-browser.prod.js.map +1 -1
- package/lib/ngw-map.esm-bundler.js +9 -9
- package/lib/ngw-map.esm-bundler.js.map +1 -1
- package/lib/ngw-map.esm-bundler.prod.js +1 -1
- package/lib/ngw-map.esm-bundler.prod.js.map +1 -1
- package/lib/ngw-map.global.js +64 -30
- package/lib/ngw-map.global.js.map +1 -1
- package/lib/ngw-map.global.prod.js +1 -1
- package/lib/ngw-map.global.prod.js.map +1 -1
- package/package.json +9 -9
package/lib/ngw-map.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 1.16.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 1.16.8; author: NextGIS */
|
|
2
2
|
var NgwMap = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -3004,11 +3004,27 @@ var NgwMap = (function (exports) {
|
|
|
3004
3004
|
}
|
|
3005
3005
|
}
|
|
3006
3006
|
};
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3007
|
+
WebMapLayers.prototype.showLayerLabel = function (layerDef) {
|
|
3008
|
+
this.toggleLayerLabel(layerDef, true);
|
|
3009
|
+
};
|
|
3010
|
+
WebMapLayers.prototype.hideLayerLabel = function (layerDef) {
|
|
3011
|
+
this.toggleLayerLabel(layerDef, false);
|
|
3012
|
+
};
|
|
3013
|
+
WebMapLayers.prototype.toggleLayerLabel = function (layerDef, status) {
|
|
3014
|
+
var layer = this.getLayer(layerDef);
|
|
3015
|
+
if (layer) {
|
|
3016
|
+
if (status) {
|
|
3017
|
+
if (layer.showLabel) {
|
|
3018
|
+
layer.showLabel();
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
else {
|
|
3022
|
+
if (layer.hideLabel) {
|
|
3023
|
+
layer.hideLabel();
|
|
3024
|
+
}
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
};
|
|
3012
3028
|
/**
|
|
3013
3029
|
* Mark the layer as selected.
|
|
3014
3030
|
* If the adapter is a vector layer and supports data selection,
|
|
@@ -3562,7 +3578,7 @@ var NgwMap = (function (exports) {
|
|
|
3562
3578
|
/**
|
|
3563
3579
|
*
|
|
3564
3580
|
* @param control - Instance of WEB-GIS framework control.
|
|
3565
|
-
* What is returned by the {@
|
|
3581
|
+
* What is returned by the {@link createControl | create} method
|
|
3566
3582
|
*/
|
|
3567
3583
|
WebMapControls.prototype.removeControl = function (control) {
|
|
3568
3584
|
var _this = this;
|
|
@@ -3885,6 +3901,10 @@ var NgwMap = (function (exports) {
|
|
|
3885
3901
|
return WebMap;
|
|
3886
3902
|
}(WebMapControls));
|
|
3887
3903
|
|
|
3904
|
+
function getDefaultControls() {
|
|
3905
|
+
return ['ZOOM', 'ATTRIBUTION'];
|
|
3906
|
+
}
|
|
3907
|
+
|
|
3888
3908
|
function createWebMap(options) {
|
|
3889
3909
|
return __awaiter(this, void 0, void 0, function () {
|
|
3890
3910
|
var webMap;
|
|
@@ -4695,7 +4715,7 @@ var NgwMap = (function (exports) {
|
|
|
4695
4715
|
/**
|
|
4696
4716
|
* Establishing a connection with NextGIS Web to fulfill all other requests.
|
|
4697
4717
|
* @remarks
|
|
4698
|
-
* This method need not be called manually as it is used when forming a request in {@link
|
|
4718
|
+
* This method need not be called manually as it is used when forming a request in {@link apiRequest | apiRequest}.
|
|
4699
4719
|
* Can be used to check connection.
|
|
4700
4720
|
* @example
|
|
4701
4721
|
* ```javascript
|
|
@@ -4940,73 +4960,73 @@ var NgwMap = (function (exports) {
|
|
|
4940
4960
|
// Resource Methods
|
|
4941
4961
|
// -------------------------------------------------------------------------
|
|
4942
4962
|
/**
|
|
4943
|
-
* {@
|
|
4963
|
+
* {@link ResourcesControl.getOne}
|
|
4944
4964
|
*/
|
|
4945
4965
|
NgwConnector.prototype.getResource = function (resource, requestOptions) {
|
|
4946
4966
|
return this.resources.getOne(resource, requestOptions);
|
|
4947
4967
|
};
|
|
4948
4968
|
/**
|
|
4949
|
-
* {@
|
|
4969
|
+
* {@link ResourcesControl.getOneOrFail}
|
|
4950
4970
|
*/
|
|
4951
4971
|
NgwConnector.prototype.getResourceOrFail = function (resource, requestOptions) {
|
|
4952
4972
|
return this.resources.getOneOrFail(resource, requestOptions);
|
|
4953
4973
|
};
|
|
4954
4974
|
/**
|
|
4955
|
-
* @deprecated - use {@link
|
|
4975
|
+
* @deprecated - use {@link getResource}
|
|
4956
4976
|
*/
|
|
4957
4977
|
NgwConnector.prototype.getResourceBy = function (resource) {
|
|
4958
4978
|
return this.resources.getOne(resource);
|
|
4959
4979
|
};
|
|
4960
4980
|
/**
|
|
4961
|
-
* @deprecated - use {@link
|
|
4981
|
+
* @deprecated - use {@link getResource}
|
|
4962
4982
|
*/
|
|
4963
4983
|
NgwConnector.prototype.getResourceByKeyname = function (keyname) {
|
|
4964
4984
|
return this.resources.getOne(keyname);
|
|
4965
4985
|
};
|
|
4966
4986
|
/**
|
|
4967
|
-
* @deprecated - use {@link
|
|
4987
|
+
* @deprecated - use {@link getResource}
|
|
4968
4988
|
*/
|
|
4969
4989
|
NgwConnector.prototype.getResourceById = function (id) {
|
|
4970
4990
|
return this.resources.getOne(id);
|
|
4971
4991
|
};
|
|
4972
4992
|
/**
|
|
4973
|
-
* {@
|
|
4993
|
+
* {@link ResourcesControl.getId}
|
|
4974
4994
|
*/
|
|
4975
4995
|
NgwConnector.prototype.getResourceId = function (resource, requestOptions) {
|
|
4976
4996
|
return this.resources.getId(resource, requestOptions);
|
|
4977
4997
|
};
|
|
4978
4998
|
/**
|
|
4979
|
-
* {@
|
|
4999
|
+
* {@link ResourcesControl.getIdOrFail}
|
|
4980
5000
|
*/
|
|
4981
5001
|
NgwConnector.prototype.getResourceIdOrFail = function (resource, requestOptions) {
|
|
4982
5002
|
return this.resources.getIdOrFail(resource, requestOptions);
|
|
4983
5003
|
};
|
|
4984
5004
|
/**
|
|
4985
|
-
* {@
|
|
5005
|
+
* {@link ResourcesControl.getMany}
|
|
4986
5006
|
*/
|
|
4987
5007
|
NgwConnector.prototype.getResourcesBy = function (resource, requestOptions) {
|
|
4988
5008
|
return this.resources.getMany(resource, requestOptions);
|
|
4989
5009
|
};
|
|
4990
5010
|
/**
|
|
4991
|
-
* {@
|
|
5011
|
+
* {@link ResourcesControl.getParent}
|
|
4992
5012
|
*/
|
|
4993
5013
|
NgwConnector.prototype.getResourceParent = function (resource, requestOptions) {
|
|
4994
5014
|
return this.resources.getParent(resource, requestOptions);
|
|
4995
5015
|
};
|
|
4996
5016
|
/**
|
|
4997
|
-
* {@
|
|
5017
|
+
* {@link ResourcesControl.getChildrenOf}
|
|
4998
5018
|
*/
|
|
4999
5019
|
NgwConnector.prototype.getResourceChildren = function (resource, requestOptions) {
|
|
5000
5020
|
return this.resources.getChildrenOf(resource, requestOptions);
|
|
5001
5021
|
};
|
|
5002
5022
|
/**
|
|
5003
|
-
* {@
|
|
5023
|
+
* {@link ResourcesControl.update}
|
|
5004
5024
|
*/
|
|
5005
5025
|
NgwConnector.prototype.updateResource = function (resource, data) {
|
|
5006
5026
|
return this.resources.update(resource, data);
|
|
5007
5027
|
};
|
|
5008
5028
|
/**
|
|
5009
|
-
* {@
|
|
5029
|
+
* {@link ResourcesControl.delete}
|
|
5010
5030
|
*/
|
|
5011
5031
|
NgwConnector.prototype.deleteResource = function (resource) {
|
|
5012
5032
|
return this.resources.delete(resource);
|
|
@@ -5106,7 +5126,6 @@ var NgwMap = (function (exports) {
|
|
|
5106
5126
|
* @packageDocumentation
|
|
5107
5127
|
* @module ngw-connector
|
|
5108
5128
|
*/
|
|
5109
|
-
// export { NgwConnector };
|
|
5110
5129
|
var NgwConnector = NgwConnector$1;
|
|
5111
5130
|
|
|
5112
5131
|
function getNgwWebmapExtent(webmap) {
|
|
@@ -7504,9 +7523,23 @@ var NgwMap = (function (exports) {
|
|
|
7504
7523
|
}
|
|
7505
7524
|
|
|
7506
7525
|
var URL = 'https://qms.nextgis.com';
|
|
7507
|
-
function createQmsAdapter(
|
|
7526
|
+
function createQmsAdapter(webMapOrOptions, url, createOpt) {
|
|
7508
7527
|
if (url === void 0) { url = URL; }
|
|
7509
7528
|
if (createOpt === void 0) { createOpt = {}; }
|
|
7529
|
+
var webMap;
|
|
7530
|
+
if ('webMap' in webMapOrOptions) {
|
|
7531
|
+
var webMap_ = webMapOrOptions.webMap, url_ = webMapOrOptions.url, adapterOptions = __rest(webMapOrOptions, ["webMap", "url"]);
|
|
7532
|
+
webMap = webMap_;
|
|
7533
|
+
if (url_) {
|
|
7534
|
+
url = url_;
|
|
7535
|
+
}
|
|
7536
|
+
if (adapterOptions) {
|
|
7537
|
+
createOpt = adapterOptions;
|
|
7538
|
+
}
|
|
7539
|
+
}
|
|
7540
|
+
else {
|
|
7541
|
+
webMap = webMapOrOptions;
|
|
7542
|
+
}
|
|
7510
7543
|
if (!url) {
|
|
7511
7544
|
url = URL;
|
|
7512
7545
|
}
|
|
@@ -7594,7 +7627,7 @@ var NgwMap = (function (exports) {
|
|
|
7594
7627
|
]);
|
|
7595
7628
|
};
|
|
7596
7629
|
QmsKit.prototype._createAdapter = function (webMap) {
|
|
7597
|
-
return createQmsAdapter(webMap, this.url);
|
|
7630
|
+
return createQmsAdapter({ webMap: webMap, url: this.url });
|
|
7598
7631
|
};
|
|
7599
7632
|
QmsKit.utils = {
|
|
7600
7633
|
createQmsAdapter: createQmsAdapter,
|
|
@@ -8304,7 +8337,7 @@ var NgwMap = (function (exports) {
|
|
|
8304
8337
|
target: 'map',
|
|
8305
8338
|
baseUrl: '',
|
|
8306
8339
|
whitlabel: false,
|
|
8307
|
-
controls:
|
|
8340
|
+
controls: getDefaultControls(),
|
|
8308
8341
|
controlsOptions: {
|
|
8309
8342
|
ZOOM: { position: 'top-left' },
|
|
8310
8343
|
ATTRIBUTION: {
|
|
@@ -8670,7 +8703,7 @@ var NgwMap = (function (exports) {
|
|
|
8670
8703
|
});
|
|
8671
8704
|
});
|
|
8672
8705
|
};
|
|
8673
|
-
/** @deprecated use {@link
|
|
8706
|
+
/** @deprecated use {@link fitLayer} instead */
|
|
8674
8707
|
NgwMap.prototype.zoomToLayer = function (layerDef) {
|
|
8675
8708
|
return __awaiter(this, void 0, void 0, function () {
|
|
8676
8709
|
return __generator(this, function (_a) {
|
|
@@ -8722,30 +8755,30 @@ var NgwMap = (function (exports) {
|
|
|
8722
8755
|
}
|
|
8723
8756
|
};
|
|
8724
8757
|
/**
|
|
8725
|
-
* @deprecated use {@link
|
|
8758
|
+
* @deprecated use {@link fetchNgwLayerItem} instead
|
|
8726
8759
|
*/
|
|
8727
8760
|
NgwMap.prototype.getNgwLayerItem = function (options) {
|
|
8728
8761
|
return this.fetchNgwLayerItem(options);
|
|
8729
8762
|
};
|
|
8730
8763
|
/**
|
|
8731
|
-
* @deprecated use {@link
|
|
8764
|
+
* @deprecated use {@link fetchNgwLayerItems} instead
|
|
8732
8765
|
*/
|
|
8733
8766
|
NgwMap.prototype.getNgwLayerItems = function (options) {
|
|
8734
8767
|
return this.fetchNgwLayerItems(options);
|
|
8735
8768
|
};
|
|
8736
8769
|
/**
|
|
8737
|
-
* @deprecated use {@link
|
|
8770
|
+
* @deprecated use {@link fetchNgwLayerFeature} instead
|
|
8738
8771
|
*/
|
|
8739
8772
|
NgwMap.prototype.getNgwLayerFeature = function (options) {
|
|
8740
8773
|
return this.fetchNgwLayerFeature(options);
|
|
8741
8774
|
};
|
|
8742
8775
|
/**
|
|
8743
|
-
* @deprecated use {@link
|
|
8776
|
+
* @deprecated use {@link fetchNgwLayerFeatures} instead
|
|
8744
8777
|
*/
|
|
8745
8778
|
NgwMap.prototype.getNgwLayerFeatures = function (options) {
|
|
8746
8779
|
return this.fetchNgwLayerFeatures(options);
|
|
8747
8780
|
};
|
|
8748
|
-
/** @deprecated use {@link
|
|
8781
|
+
/** @deprecated use {@link cancelPromises} instead */
|
|
8749
8782
|
NgwMap.prototype.cancelPromise = function () {
|
|
8750
8783
|
var args = [];
|
|
8751
8784
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -9033,6 +9066,7 @@ var NgwMap = (function (exports) {
|
|
|
9033
9066
|
exports.createWebMap = createWebMap;
|
|
9034
9067
|
exports.detectGeometryType = detectGeometryType;
|
|
9035
9068
|
exports.findMostFrequentGeomType = findMostFrequentGeomType;
|
|
9069
|
+
exports.getDefaultControls = getDefaultControls;
|
|
9036
9070
|
exports.getWebMap = getWebMap;
|
|
9037
9071
|
exports.updateGeoJsonAdapterOptions = updateGeoJsonAdapterOptions;
|
|
9038
9072
|
|