@nextgis/ngw-leaflet 3.1.0 → 3.1.1
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 +22 -67
- package/lib/ngw-leaflet.esm-browser.js.map +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js +2 -2
- package/lib/ngw-leaflet.esm-browser.prod.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.js +1 -1
- package/lib/ngw-leaflet.esm-bundler.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.prod.js.map +1 -1
- package/lib/ngw-leaflet.global.js +22 -67
- 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: 3.1.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 3.1.1; author: NextGIS */
|
|
2
2
|
var domain;
|
|
3
3
|
|
|
4
4
|
// This constructor is used to store event handlers. Instantiating this is
|
|
@@ -29,7 +29,9 @@ EventEmitter.init = function() {
|
|
|
29
29
|
this.domain = null;
|
|
30
30
|
if (EventEmitter.usingDomains) {
|
|
31
31
|
// if there is an active domain, then attach to it.
|
|
32
|
-
if (domain.active)
|
|
32
|
+
if (domain.active && !(this instanceof domain.Domain)) {
|
|
33
|
+
this.domain = domain.active;
|
|
34
|
+
}
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
|
|
@@ -18186,63 +18188,7 @@ __publicField$A(_Cache, "instance", {});
|
|
|
18186
18188
|
let Cache = _Cache;
|
|
18187
18189
|
|
|
18188
18190
|
var pkg = {
|
|
18189
|
-
|
|
18190
|
-
version: "3.0.1",
|
|
18191
|
-
_priority: 12,
|
|
18192
|
-
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
18193
|
-
main: "index.js",
|
|
18194
|
-
module: "lib/ngw-connector.esm-bundler.js",
|
|
18195
|
-
unpkg: "lib/ngw-connector.global.prod.js",
|
|
18196
|
-
jsdelivr: "lib/ngw-connector.global.prod.js",
|
|
18197
|
-
types: "lib/index.d.ts",
|
|
18198
|
-
dependencies: {
|
|
18199
|
-
"@nextgis/cache": "3.0.0",
|
|
18200
|
-
"@nextgis/cancelable-promise": "3.0.0",
|
|
18201
|
-
"@nextgis/utils": "3.0.0",
|
|
18202
|
-
"@types/events": "^3.0.0",
|
|
18203
|
-
events: "*",
|
|
18204
|
-
"form-data": "^4.0.0"
|
|
18205
|
-
},
|
|
18206
|
-
devDependencies: {
|
|
18207
|
-
"@nextgis/build-tools": "3.0.0"
|
|
18208
|
-
},
|
|
18209
|
-
scripts: {
|
|
18210
|
-
clean: "rimraf ./lib",
|
|
18211
|
-
dev: "node ../build-tools/lib/build.js",
|
|
18212
|
-
prod: "npm run dev -- --release",
|
|
18213
|
-
lint: "eslint ./src/**/*.ts --fix --c ../../.eslintrc",
|
|
18214
|
-
watch: "npm run dev -- --watch",
|
|
18215
|
-
"gen:types": "node ./scripts/generator"
|
|
18216
|
-
},
|
|
18217
|
-
buildOptions: {
|
|
18218
|
-
name: "NgwConnector",
|
|
18219
|
-
formats: [
|
|
18220
|
-
"esm-bundler",
|
|
18221
|
-
"esm-browser",
|
|
18222
|
-
"cjs",
|
|
18223
|
-
"global"
|
|
18224
|
-
]
|
|
18225
|
-
},
|
|
18226
|
-
keywords: [
|
|
18227
|
-
"NextGIS",
|
|
18228
|
-
"MAP"
|
|
18229
|
-
],
|
|
18230
|
-
author: "NextGIS",
|
|
18231
|
-
files: [
|
|
18232
|
-
"index.js",
|
|
18233
|
-
"lib"
|
|
18234
|
-
],
|
|
18235
|
-
license: "MIT",
|
|
18236
|
-
homepage: "https://github.com/nextgis/nextgis_frontend/tree/master/packages/ngw-connector#readme",
|
|
18237
|
-
repository: {
|
|
18238
|
-
type: "git",
|
|
18239
|
-
url: "git://github.com/nextgis/nextgis_frontend.git"
|
|
18240
|
-
},
|
|
18241
|
-
engines: {
|
|
18242
|
-
node: ">=18.20.4"
|
|
18243
|
-
},
|
|
18244
|
-
gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
|
|
18245
|
-
};
|
|
18191
|
+
version: "3.1.1"};
|
|
18246
18192
|
|
|
18247
18193
|
class AbortError extends Error {
|
|
18248
18194
|
constructor(message = "AbortError") {
|
|
@@ -19153,7 +19099,7 @@ class NgwConnector {
|
|
|
19153
19099
|
throw new Error("Empty `url` not allowed");
|
|
19154
19100
|
}
|
|
19155
19101
|
if (params) {
|
|
19156
|
-
const _a = params, restParams = __objRest$4(_a, ["paramList"]);
|
|
19102
|
+
const _a = params, { paramList } = _a, restParams = __objRest$4(_a, ["paramList"]);
|
|
19157
19103
|
url = template(url, restParams);
|
|
19158
19104
|
}
|
|
19159
19105
|
url = encodeURI(fixUrlStr(url));
|
|
@@ -19443,8 +19389,9 @@ class ResourcesControl {
|
|
|
19443
19389
|
query: __spreadValues$r({
|
|
19444
19390
|
serialization: "full"
|
|
19445
19391
|
}, query)
|
|
19446
|
-
})).then((
|
|
19447
|
-
|
|
19392
|
+
})).then((response) => {
|
|
19393
|
+
const resources = Array.isArray(response) ? response : response.items;
|
|
19394
|
+
if (requestOptions == null ? void 0 : requestOptions.cache) {
|
|
19448
19395
|
for (const x of resources) {
|
|
19449
19396
|
this.cache.add("resource.item", Promise.resolve(x), {
|
|
19450
19397
|
id: x.resource.id
|
|
@@ -22474,9 +22421,9 @@ function createBasemapLayerAdapter(_0) {
|
|
|
22474
22421
|
item
|
|
22475
22422
|
}) {
|
|
22476
22423
|
if (item.basemap_layer) {
|
|
22477
|
-
const
|
|
22478
|
-
const url =
|
|
22479
|
-
if (qms) {
|
|
22424
|
+
const basemap = item.basemap_layer;
|
|
22425
|
+
const { qms, url } = basemap;
|
|
22426
|
+
if (qms && typeof qms === "string") {
|
|
22480
22427
|
const qms_ = JSON.parse(qms);
|
|
22481
22428
|
const adapter = Promise.resolve(
|
|
22482
22429
|
QmsKit.utils.createQmsAdapter(webMap, void 0, {
|
|
@@ -22489,10 +22436,19 @@ function createBasemapLayerAdapter(_0) {
|
|
|
22489
22436
|
const TileAdapter = webMap.mapAdapter.layerAdapters.TILE;
|
|
22490
22437
|
if (TileAdapter) {
|
|
22491
22438
|
class BasemapTileAdapter extends TileAdapter {
|
|
22439
|
+
constructor(map, options) {
|
|
22440
|
+
super(map, __spreadProps$9(__spreadValues$b({}, options), { baselayer: true, order: 0 }));
|
|
22441
|
+
}
|
|
22492
22442
|
addLayer(opt) {
|
|
22493
22443
|
return __async$f(this, null, function* () {
|
|
22444
|
+
var _a, _b, _c;
|
|
22494
22445
|
if (url) {
|
|
22495
|
-
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$9(__spreadValues$b({}, opt), {
|
|
22446
|
+
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$9(__spreadValues$b({}, opt), {
|
|
22447
|
+
url,
|
|
22448
|
+
minZoom: (_a = basemap.z_min) != null ? _a : opt.minZoom,
|
|
22449
|
+
maxZoom: (_b = basemap.z_max) != null ? _b : opt.maxZoom,
|
|
22450
|
+
attribution: (_c = basemap.copyright_text) != null ? _c : opt.attribution
|
|
22451
|
+
}));
|
|
22496
22452
|
}
|
|
22497
22453
|
});
|
|
22498
22454
|
}
|
|
@@ -26394,7 +26350,6 @@ const _NgwMap = class _NgwMap extends WebMap {
|
|
|
26394
26350
|
const promise = fetchIdentifyGeoJson({
|
|
26395
26351
|
identify,
|
|
26396
26352
|
connector: this.connector,
|
|
26397
|
-
multiple,
|
|
26398
26353
|
requestOptions: { signal: abortController.signal }
|
|
26399
26354
|
});
|
|
26400
26355
|
if (promise && "then" in promise) {
|