@nextgis/ngw-leaflet 3.0.1 → 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 +212 -94
- 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 +212 -94
- 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: 3.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 3.1.1; author: NextGIS */
|
|
2
2
|
import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';
|
|
3
3
|
import { NgwMap } from '@nextgis/ngw-map';
|
|
4
4
|
import { Icon } from 'leaflet';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngw-leaflet.esm-bundler.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js","../src/index.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\nimport { NgwMap } from '@nextgis/ngw-map';\nimport { Icon } from 'leaflet';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\nimport type { NgwMapOptions } from '@nextgis/ngw-map';\nimport type { Map } from 'leaflet';\n\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\n// @ts-expect-error Property '_getIconUrl' does not exist on type 'Default'.\ndelete Icon.Default.prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\n/**\n * Displaying the [NgwMap](ngw-map-api)\n * using the [LeafletMapAdapter](leaflet-map-adapter-api)\n *\n * @example\n * ```javascript\n * // Base initialization\n * // [live demo](http://code.nextgis.com/ngw-leaflet-examples-ngw-webmap)\n * import { NgwMap } from '@nextgis/ngw-leaflet';\n *\n * const ngwMap = new NgwMap({\n * target: 'map',\n * qmsId: 448,\n * baseUrl: 'https://demo.nextgis.com',\n * webmapId: 3985\n * });\n * ```\n */\nclass NgwLeaflet extends NgwMap<Map> {\n constructor(options: NgwMapOptions) {\n options = { ...options, mapAdapter: new LeafletMapAdapter() };\n super(options);\n }\n static async create(options: NgwMapOptions): Promise<NgwLeaflet> {\n const ngwMap = new NgwLeaflet(options);\n return ngwMap.onLoad();\n }\n}\n\nexport default NgwLeaflet;\n\nif ((window as any) && !(window as any).NgwMap) {\n (window as any).NgwMap = NgwLeaflet;\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"ngw-leaflet.esm-bundler.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js","../src/index.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\nimport { NgwMap } from '@nextgis/ngw-map';\nimport { Icon } from 'leaflet';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\nimport type { NgwMapOptions } from '@nextgis/ngw-map';\nimport type { Map } from 'leaflet';\n\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\n// @ts-expect-error Property '_getIconUrl' does not exist on type 'Default'.\ndelete Icon.Default.prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\n/**\n * Displaying the [NgwMap](ngw-map-api)\n * using the [LeafletMapAdapter](leaflet-map-adapter-api)\n *\n * @example\n * ```javascript\n * // Base initialization\n * // [live demo](http://code.nextgis.com/ngw-leaflet-examples-ngw-webmap)\n * import { NgwMap } from '@nextgis/ngw-leaflet';\n *\n * const ngwMap = new NgwMap({\n * target: 'map',\n * qmsId: 448,\n * baseUrl: 'https://demo.nextgis.com',\n * webmapId: 3985\n * });\n * ```\n */\nclass NgwLeaflet extends NgwMap<Map> {\n constructor(options: NgwMapOptions) {\n options = { ...options, mapAdapter: new LeafletMapAdapter() };\n super(options);\n }\n static async create(options: NgwMapOptions): Promise<NgwLeaflet> {\n const ngwMap = new NgwLeaflet(options);\n return ngwMap.onLoad();\n }\n}\n\nexport default NgwLeaflet;\n\nif ((window as any) && !(window as any).NgwMap) {\n (window as any).NgwMap = NgwLeaflet;\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,MAAM,GAAG,GAAG,GAAG,EAAE;AAChC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ;;AAE7B,EAAE,IAAY,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,CAAC;;AAEzD,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU;;AAEzB,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AAC/C,IAAI,CAAC,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC7B,IAAI;AACJ,EAAE,CAAC,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B,EAAE;;AAEF,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG;AAClC,EAAE,CAAC,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACnD,EAAE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXA,OAAO,IAAA,CAAK,QAAQ,SAAA,CAAU,WAAA;AAE9B,IAAA,CAAK,QAAQ,YAAA,CAAa;AAAA,EACxB,aAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAC,CAAA;AAoBD,MAAM,mBAAmB,MAAA,CAAY;AAAA,EACnC,YAAY,OAAA,EAAwB;AAClC,IAAA,OAAA,GAAU,iCAAK,OAAA,CAAA,EAAL,EAAc,UAAA,EAAY,IAAI,mBAAkB,EAAE,CAAA;AAC5D,IAAA,KAAA,CAAM,OAAO,CAAA;AAAA,EACf;AAAA,EACA,OAAa,OAAO,OAAA,EAA6C;AAAA,IAAA,OAAA,OAAA,CAAA,IAAA,EAAA,IAAA,EAAA,aAAA;AAC/D,MAAA,MAAM,MAAA,GAAS,IAAI,UAAA,CAAW,OAAO,CAAA;AACrC,MAAA,OAAO,OAAO,MAAA,EAAO;AAAA,IACvB,CAAA,CAAA;AAAA,EAAA;AACF;AAIA,IAAK,MAAA,IAAkB,CAAE,MAAA,CAAe,MAAA,EAAQ;AAC9C,EAAC,OAAe,MAAA,GAAS,UAAA;AAC3B;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngw-leaflet.esm-bundler.prod.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js","../src/index.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\nimport { NgwMap } from '@nextgis/ngw-map';\nimport { Icon } from 'leaflet';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\nimport type { NgwMapOptions } from '@nextgis/ngw-map';\nimport type { Map } from 'leaflet';\n\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\n// @ts-expect-error Property '_getIconUrl' does not exist on type 'Default'.\ndelete Icon.Default.prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\n/**\n * Displaying the [NgwMap](ngw-map-api)\n * using the [LeafletMapAdapter](leaflet-map-adapter-api)\n *\n * @example\n * ```javascript\n * // Base initialization\n * // [live demo](http://code.nextgis.com/ngw-leaflet-examples-ngw-webmap)\n * import { NgwMap } from '@nextgis/ngw-leaflet';\n *\n * const ngwMap = new NgwMap({\n * target: 'map',\n * qmsId: 448,\n * baseUrl: 'https://demo.nextgis.com',\n * webmapId: 3985\n * });\n * ```\n */\nclass NgwLeaflet extends NgwMap<Map> {\n constructor(options: NgwMapOptions) {\n options = { ...options, mapAdapter: new LeafletMapAdapter() };\n super(options);\n }\n static async create(options: NgwMapOptions): Promise<NgwLeaflet> {\n const ngwMap = new NgwLeaflet(options);\n return ngwMap.onLoad();\n }\n}\n\nexport default NgwLeaflet;\n\nif ((window as any) && !(window as any).NgwMap) {\n (window as any).NgwMap = NgwLeaflet;\n}\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","Icon","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","iconUrl","shadowUrl","NgwLeaflet","NgwMap","constructor","options","mapAdapter","LeafletMapAdapter","super","create","this","onLoad","window"],"mappings":"qTAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,
|
|
1
|
+
{"version":3,"file":"ngw-leaflet.esm-bundler.prod.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js","../src/index.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\nimport { NgwMap } from '@nextgis/ngw-map';\nimport { Icon } from 'leaflet';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\nimport type { NgwMapOptions } from '@nextgis/ngw-map';\nimport type { Map } from 'leaflet';\n\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\n// @ts-expect-error Property '_getIconUrl' does not exist on type 'Default'.\ndelete Icon.Default.prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\n/**\n * Displaying the [NgwMap](ngw-map-api)\n * using the [LeafletMapAdapter](leaflet-map-adapter-api)\n *\n * @example\n * ```javascript\n * // Base initialization\n * // [live demo](http://code.nextgis.com/ngw-leaflet-examples-ngw-webmap)\n * import { NgwMap } from '@nextgis/ngw-leaflet';\n *\n * const ngwMap = new NgwMap({\n * target: 'map',\n * qmsId: 448,\n * baseUrl: 'https://demo.nextgis.com',\n * webmapId: 3985\n * });\n * ```\n */\nclass NgwLeaflet extends NgwMap<Map> {\n constructor(options: NgwMapOptions) {\n options = { ...options, mapAdapter: new LeafletMapAdapter() };\n super(options);\n }\n static async create(options: NgwMapOptions): Promise<NgwLeaflet> {\n const ngwMap = new NgwLeaflet(options);\n return ngwMap.onLoad();\n }\n}\n\nexport default NgwLeaflet;\n\nif ((window as any) && !(window as any).NgwMap) {\n (window as any).NgwMap = NgwLeaflet;\n}\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","Icon","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","iconUrl","shadowUrl","NgwLeaflet","NgwMap","constructor","options","mapAdapter","LeafletMapAdapter","super","create","this","onLoad","window"],"mappings":"qTAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,6YCXOe,EAAKC,QAAQC,UAAUC,YAE9BH,EAAKC,QAAQG,aAAa,CACxBC,gBACAC,UACAC,cAqBF,MAAMC,UAAmBC,EACvB,WAAAC,CAAYC,oIACKA,KAAL,CAAcC,WAAY,IAAIC,GACxCC,MADAH,YAEF,CACA,aAAaI,CAAOJ,GAA6C,SAAAK,OAAA,OAAA,YAE/D,OADe,IAAIR,EAAWG,GAChBM,QAChB,yMAAA,EAKGC,SAAoBA,OAAeT,SACrCS,OAAeT,OAASD","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 3.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 3.1.1; author: NextGIS */
|
|
2
2
|
var NgwLeaflet = (function () {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -32,7 +32,9 @@ var NgwLeaflet = (function () {
|
|
|
32
32
|
this.domain = null;
|
|
33
33
|
if (EventEmitter.usingDomains) {
|
|
34
34
|
// if there is an active domain, then attach to it.
|
|
35
|
-
if (domain.active)
|
|
35
|
+
if (domain.active && !(this instanceof domain.Domain)) {
|
|
36
|
+
this.domain = domain.active;
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
|
|
@@ -15946,7 +15948,7 @@ var NgwLeaflet = (function () {
|
|
|
15946
15948
|
return like(a, b, true);
|
|
15947
15949
|
}
|
|
15948
15950
|
};
|
|
15949
|
-
function isPropertyFilter(filter) {
|
|
15951
|
+
function isPropertyFilter$1(filter) {
|
|
15950
15952
|
const pf = filter;
|
|
15951
15953
|
if (pf.length === 3 && typeof pf[0] === "string" && typeof pf[1] === "string") {
|
|
15952
15954
|
return true;
|
|
@@ -15964,7 +15966,7 @@ var NgwLeaflet = (function () {
|
|
|
15964
15966
|
function propertiesFilter(properties, filters) {
|
|
15965
15967
|
const logic = typeof filters[0] === "string" ? filters[0] : "all";
|
|
15966
15968
|
const filterFunction = (p) => {
|
|
15967
|
-
if (isPropertyFilter(p)) {
|
|
15969
|
+
if (isPropertyFilter$1(p)) {
|
|
15968
15970
|
const [field, operation, value] = p;
|
|
15969
15971
|
const operationExec = operationsAliases[operation];
|
|
15970
15972
|
if (operationExec) {
|
|
@@ -16163,7 +16165,7 @@ var NgwLeaflet = (function () {
|
|
|
16163
16165
|
return a;
|
|
16164
16166
|
};
|
|
16165
16167
|
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
16166
|
-
var __objRest$
|
|
16168
|
+
var __objRest$9 = (source, exclude) => {
|
|
16167
16169
|
var target = {};
|
|
16168
16170
|
for (var prop in source)
|
|
16169
16171
|
if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -16246,7 +16248,7 @@ var NgwLeaflet = (function () {
|
|
|
16246
16248
|
return PAINT;
|
|
16247
16249
|
}
|
|
16248
16250
|
_createDivIcon(icon) {
|
|
16249
|
-
const _a = icon, { html, rotate, className } = _a, toLIconOpt = __objRest$
|
|
16251
|
+
const _a = icon, { html, rotate, className } = _a, toLIconOpt = __objRest$9(_a, ["html", "rotate", "className"]);
|
|
16250
16252
|
const element = document.createElement("div");
|
|
16251
16253
|
if (className) {
|
|
16252
16254
|
element.className = className;
|
|
@@ -17371,7 +17373,7 @@ var NgwLeaflet = (function () {
|
|
|
17371
17373
|
return a;
|
|
17372
17374
|
};
|
|
17373
17375
|
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
17374
|
-
var __objRest$
|
|
17376
|
+
var __objRest$8 = (source, exclude) => {
|
|
17375
17377
|
var target = {};
|
|
17376
17378
|
for (var prop in source)
|
|
17377
17379
|
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -17387,7 +17389,7 @@ var NgwLeaflet = (function () {
|
|
|
17387
17389
|
addLayer(options) {
|
|
17388
17390
|
this.options = Object.assign(this.options, options);
|
|
17389
17391
|
if (options) {
|
|
17390
|
-
const _a = options, { url } = _a, opt = __objRest$
|
|
17392
|
+
const _a = options, { url } = _a, opt = __objRest$8(_a, ["url"]);
|
|
17391
17393
|
if (url) {
|
|
17392
17394
|
const tileLayerOptions = __spreadValues$z({
|
|
17393
17395
|
pane: this.pane,
|
|
@@ -17480,7 +17482,7 @@ var NgwLeaflet = (function () {
|
|
|
17480
17482
|
return a;
|
|
17481
17483
|
};
|
|
17482
17484
|
var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
|
|
17483
|
-
var __objRest$
|
|
17485
|
+
var __objRest$7 = (source, exclude) => {
|
|
17484
17486
|
var target = {};
|
|
17485
17487
|
for (var prop in source)
|
|
17486
17488
|
if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -17495,7 +17497,7 @@ var NgwLeaflet = (function () {
|
|
|
17495
17497
|
class WmsAdapter extends BaseAdapter {
|
|
17496
17498
|
addLayer(options) {
|
|
17497
17499
|
Object.assign(this.options, options);
|
|
17498
|
-
const _a = options, { url } = _a, opt = __objRest$
|
|
17500
|
+
const _a = options, { url } = _a, opt = __objRest$7(_a, ["url"]);
|
|
17499
17501
|
if (url) {
|
|
17500
17502
|
const layerOptions = __spreadValues$x({
|
|
17501
17503
|
pane: this.pane,
|
|
@@ -18189,63 +18191,7 @@ var NgwLeaflet = (function () {
|
|
|
18189
18191
|
let Cache = _Cache;
|
|
18190
18192
|
|
|
18191
18193
|
var pkg = {
|
|
18192
|
-
|
|
18193
|
-
version: "3.0.1",
|
|
18194
|
-
_priority: 12,
|
|
18195
|
-
description: "A lightweight HTTP client optimized for use with NextGIS Web API",
|
|
18196
|
-
main: "index.js",
|
|
18197
|
-
module: "lib/ngw-connector.esm-bundler.js",
|
|
18198
|
-
unpkg: "lib/ngw-connector.global.prod.js",
|
|
18199
|
-
jsdelivr: "lib/ngw-connector.global.prod.js",
|
|
18200
|
-
types: "lib/index.d.ts",
|
|
18201
|
-
dependencies: {
|
|
18202
|
-
"@nextgis/cache": "3.0.0",
|
|
18203
|
-
"@nextgis/cancelable-promise": "3.0.0",
|
|
18204
|
-
"@nextgis/utils": "3.0.0",
|
|
18205
|
-
"@types/events": "^3.0.0",
|
|
18206
|
-
events: "*",
|
|
18207
|
-
"form-data": "^4.0.0"
|
|
18208
|
-
},
|
|
18209
|
-
devDependencies: {
|
|
18210
|
-
"@nextgis/build-tools": "3.0.0"
|
|
18211
|
-
},
|
|
18212
|
-
scripts: {
|
|
18213
|
-
clean: "rimraf ./lib",
|
|
18214
|
-
dev: "node ../build-tools/lib/build.js",
|
|
18215
|
-
prod: "npm run dev -- --release",
|
|
18216
|
-
lint: "eslint ./src/**/*.ts --fix --c ../../.eslintrc",
|
|
18217
|
-
watch: "npm run dev -- --watch",
|
|
18218
|
-
"gen:types": "node ./scripts/generator"
|
|
18219
|
-
},
|
|
18220
|
-
buildOptions: {
|
|
18221
|
-
name: "NgwConnector",
|
|
18222
|
-
formats: [
|
|
18223
|
-
"esm-bundler",
|
|
18224
|
-
"esm-browser",
|
|
18225
|
-
"cjs",
|
|
18226
|
-
"global"
|
|
18227
|
-
]
|
|
18228
|
-
},
|
|
18229
|
-
keywords: [
|
|
18230
|
-
"NextGIS",
|
|
18231
|
-
"MAP"
|
|
18232
|
-
],
|
|
18233
|
-
author: "NextGIS",
|
|
18234
|
-
files: [
|
|
18235
|
-
"index.js",
|
|
18236
|
-
"lib"
|
|
18237
|
-
],
|
|
18238
|
-
license: "MIT",
|
|
18239
|
-
homepage: "https://github.com/nextgis/nextgis_frontend/tree/master/packages/ngw-connector#readme",
|
|
18240
|
-
repository: {
|
|
18241
|
-
type: "git",
|
|
18242
|
-
url: "git://github.com/nextgis/nextgis_frontend.git"
|
|
18243
|
-
},
|
|
18244
|
-
engines: {
|
|
18245
|
-
node: ">=18.20.4"
|
|
18246
|
-
},
|
|
18247
|
-
gitHead: "edc68033f914f6c95c4125b9738bba6d36e990b4"
|
|
18248
|
-
};
|
|
18194
|
+
version: "3.1.1"};
|
|
18249
18195
|
|
|
18250
18196
|
class AbortError extends Error {
|
|
18251
18197
|
constructor(message = "AbortError") {
|
|
@@ -18447,7 +18393,7 @@ var NgwLeaflet = (function () {
|
|
|
18447
18393
|
}
|
|
18448
18394
|
return a;
|
|
18449
18395
|
};
|
|
18450
|
-
var __objRest$
|
|
18396
|
+
var __objRest$6 = (source, exclude) => {
|
|
18451
18397
|
var target = {};
|
|
18452
18398
|
for (var prop in source)
|
|
18453
18399
|
if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -18601,7 +18547,7 @@ var NgwLeaflet = (function () {
|
|
|
18601
18547
|
cache,
|
|
18602
18548
|
query,
|
|
18603
18549
|
json
|
|
18604
|
-
} = _a, opt = __objRest$
|
|
18550
|
+
} = _a, opt = __objRest$6(_a, [
|
|
18605
18551
|
"withCredentials",
|
|
18606
18552
|
"responseType",
|
|
18607
18553
|
"cacheProps",
|
|
@@ -18711,7 +18657,7 @@ var NgwLeaflet = (function () {
|
|
|
18711
18657
|
return a;
|
|
18712
18658
|
};
|
|
18713
18659
|
var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
|
|
18714
|
-
var __objRest$
|
|
18660
|
+
var __objRest$5 = (source, exclude) => {
|
|
18715
18661
|
var target = {};
|
|
18716
18662
|
for (var prop in source)
|
|
18717
18663
|
if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -18790,7 +18736,7 @@ var NgwLeaflet = (function () {
|
|
|
18790
18736
|
for (const method of methods) {
|
|
18791
18737
|
const methodResp = (requestOptions) => {
|
|
18792
18738
|
var _b;
|
|
18793
|
-
const _a = requestOptions || {}, { headers: optHeaders } = _a, restOpt = __objRest$
|
|
18739
|
+
const _a = requestOptions || {}, { headers: optHeaders } = _a, restOpt = __objRest$5(_a, ["headers"]);
|
|
18794
18740
|
if ((_b = requestOptions == null ? void 0 : requestOptions.signal) == null ? void 0 : _b.aborted) {
|
|
18795
18741
|
throw new AbortError();
|
|
18796
18742
|
}
|
|
@@ -18948,7 +18894,7 @@ var NgwLeaflet = (function () {
|
|
|
18948
18894
|
return a;
|
|
18949
18895
|
};
|
|
18950
18896
|
var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
|
|
18951
|
-
var __objRest$
|
|
18897
|
+
var __objRest$4 = (source, exclude) => {
|
|
18952
18898
|
var target = {};
|
|
18953
18899
|
for (var prop in source)
|
|
18954
18900
|
if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -19156,7 +19102,7 @@ var NgwLeaflet = (function () {
|
|
|
19156
19102
|
throw new Error("Empty `url` not allowed");
|
|
19157
19103
|
}
|
|
19158
19104
|
if (params) {
|
|
19159
|
-
const _a = params, restParams = __objRest$
|
|
19105
|
+
const _a = params, { paramList } = _a, restParams = __objRest$4(_a, ["paramList"]);
|
|
19160
19106
|
url = template(url, restParams);
|
|
19161
19107
|
}
|
|
19162
19108
|
url = encodeURI(fixUrlStr(url));
|
|
@@ -19446,8 +19392,9 @@ var NgwLeaflet = (function () {
|
|
|
19446
19392
|
query: __spreadValues$r({
|
|
19447
19393
|
serialization: "full"
|
|
19448
19394
|
}, query)
|
|
19449
|
-
})).then((
|
|
19450
|
-
|
|
19395
|
+
})).then((response) => {
|
|
19396
|
+
const resources = Array.isArray(response) ? response : response.items;
|
|
19397
|
+
if (requestOptions == null ? void 0 : requestOptions.cache) {
|
|
19451
19398
|
for (const x of resources) {
|
|
19452
19399
|
this.cache.add("resource.item", Promise.resolve(x), {
|
|
19453
19400
|
id: x.resource.id
|
|
@@ -20303,7 +20250,7 @@ var NgwLeaflet = (function () {
|
|
|
20303
20250
|
const filters_ = filters.filter((x) => Array.isArray(x));
|
|
20304
20251
|
if (logic === "any") {
|
|
20305
20252
|
for (const f of filters_) {
|
|
20306
|
-
if (isPropertyFilter(f)) {
|
|
20253
|
+
if (isPropertyFilter$1(f)) {
|
|
20307
20254
|
_queries.push(
|
|
20308
20255
|
fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
|
|
20309
20256
|
paramList: [..._parentAllParams, ...paramList, createParam(f)]
|
|
@@ -20317,7 +20264,7 @@ var NgwLeaflet = (function () {
|
|
|
20317
20264
|
const filters2 = [];
|
|
20318
20265
|
const propertiesFilterList = [];
|
|
20319
20266
|
for (const f of filters_) {
|
|
20320
|
-
if (isPropertyFilter(f)) {
|
|
20267
|
+
if (isPropertyFilter$1(f)) {
|
|
20321
20268
|
filters2.push(createParam(f));
|
|
20322
20269
|
} else {
|
|
20323
20270
|
propertiesFilterList.push(f);
|
|
@@ -22134,7 +22081,7 @@ var NgwLeaflet = (function () {
|
|
|
22134
22081
|
return a;
|
|
22135
22082
|
};
|
|
22136
22083
|
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
22137
|
-
var __objRest$
|
|
22084
|
+
var __objRest$3 = (source, exclude) => {
|
|
22138
22085
|
var target = {};
|
|
22139
22086
|
for (var prop in source)
|
|
22140
22087
|
if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -22147,7 +22094,7 @@ var NgwLeaflet = (function () {
|
|
|
22147
22094
|
return target;
|
|
22148
22095
|
};
|
|
22149
22096
|
function updateImageParams(params, resourceId) {
|
|
22150
|
-
const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$
|
|
22097
|
+
const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$3(_a, ["bbox", "width", "height", "nd"]);
|
|
22151
22098
|
return __spreadProps$a(__spreadValues$e({}, rest), {
|
|
22152
22099
|
resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
|
|
22153
22100
|
extent: bbox,
|
|
@@ -22278,7 +22225,7 @@ var NgwLeaflet = (function () {
|
|
|
22278
22225
|
}
|
|
22279
22226
|
return a;
|
|
22280
22227
|
};
|
|
22281
|
-
var __objRest$
|
|
22228
|
+
var __objRest$2 = (source, exclude) => {
|
|
22282
22229
|
var target = {};
|
|
22283
22230
|
for (var prop in source)
|
|
22284
22231
|
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
@@ -22315,7 +22262,7 @@ var NgwLeaflet = (function () {
|
|
|
22315
22262
|
function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
|
|
22316
22263
|
let webMap;
|
|
22317
22264
|
if ("webMap" in webMapOrOptions) {
|
|
22318
|
-
const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$
|
|
22265
|
+
const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$2(_a, ["webMap", "url"]);
|
|
22319
22266
|
webMap = webMap_;
|
|
22320
22267
|
if (url_) {
|
|
22321
22268
|
url = url_;
|
|
@@ -22477,9 +22424,9 @@ var NgwLeaflet = (function () {
|
|
|
22477
22424
|
item
|
|
22478
22425
|
}) {
|
|
22479
22426
|
if (item.basemap_layer) {
|
|
22480
|
-
const
|
|
22481
|
-
const url =
|
|
22482
|
-
if (qms) {
|
|
22427
|
+
const basemap = item.basemap_layer;
|
|
22428
|
+
const { qms, url } = basemap;
|
|
22429
|
+
if (qms && typeof qms === "string") {
|
|
22483
22430
|
const qms_ = JSON.parse(qms);
|
|
22484
22431
|
const adapter = Promise.resolve(
|
|
22485
22432
|
QmsKit.utils.createQmsAdapter(webMap, void 0, {
|
|
@@ -22492,10 +22439,19 @@ var NgwLeaflet = (function () {
|
|
|
22492
22439
|
const TileAdapter = webMap.mapAdapter.layerAdapters.TILE;
|
|
22493
22440
|
if (TileAdapter) {
|
|
22494
22441
|
class BasemapTileAdapter extends TileAdapter {
|
|
22442
|
+
constructor(map, options) {
|
|
22443
|
+
super(map, __spreadProps$9(__spreadValues$b({}, options), { baselayer: true, order: 0 }));
|
|
22444
|
+
}
|
|
22495
22445
|
addLayer(opt) {
|
|
22496
22446
|
return __async$f(this, null, function* () {
|
|
22447
|
+
var _a, _b, _c;
|
|
22497
22448
|
if (url) {
|
|
22498
|
-
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$9(__spreadValues$b({}, opt), {
|
|
22449
|
+
return __superGet$2(BasemapTileAdapter.prototype, this, "addLayer").call(this, __spreadProps$9(__spreadValues$b({}, opt), {
|
|
22450
|
+
url,
|
|
22451
|
+
minZoom: (_a = basemap.z_min) != null ? _a : opt.minZoom,
|
|
22452
|
+
maxZoom: (_b = basemap.z_max) != null ? _b : opt.maxZoom,
|
|
22453
|
+
attribution: (_c = basemap.copyright_text) != null ? _c : opt.attribution
|
|
22454
|
+
}));
|
|
22499
22455
|
}
|
|
22500
22456
|
});
|
|
22501
22457
|
}
|
|
@@ -22956,6 +22912,134 @@ var NgwLeaflet = (function () {
|
|
|
22956
22912
|
});
|
|
22957
22913
|
}
|
|
22958
22914
|
|
|
22915
|
+
function isPropertyFilter(value) {
|
|
22916
|
+
return Array.isArray(value) && value.length === 3 && typeof value[0] === "string" && typeof value[1] === "string";
|
|
22917
|
+
}
|
|
22918
|
+
function isPropertiesFilterGroup(value) {
|
|
22919
|
+
return Array.isArray(value) && !isPropertyFilter(value);
|
|
22920
|
+
}
|
|
22921
|
+
function toGetExpr(field) {
|
|
22922
|
+
return ["get", field];
|
|
22923
|
+
}
|
|
22924
|
+
function toConditionExpr(filter) {
|
|
22925
|
+
const [fieldRaw, op, value] = filter;
|
|
22926
|
+
const field = String(fieldRaw);
|
|
22927
|
+
const getExpr = toGetExpr(field);
|
|
22928
|
+
switch (op) {
|
|
22929
|
+
case "eq":
|
|
22930
|
+
if (value === null) {
|
|
22931
|
+
return ["is_null", getExpr];
|
|
22932
|
+
}
|
|
22933
|
+
return ["==", getExpr, value];
|
|
22934
|
+
case "ne":
|
|
22935
|
+
if (value === null) {
|
|
22936
|
+
return ["!is_null", getExpr];
|
|
22937
|
+
}
|
|
22938
|
+
return ["!=", getExpr, value];
|
|
22939
|
+
case "gt":
|
|
22940
|
+
if (typeof value !== "number" && typeof value !== "string") {
|
|
22941
|
+
throw new Error(
|
|
22942
|
+
`Operator "gt" requires number or string for "${field}"`
|
|
22943
|
+
);
|
|
22944
|
+
}
|
|
22945
|
+
return [">", getExpr, value];
|
|
22946
|
+
case "lt":
|
|
22947
|
+
if (typeof value !== "number" && typeof value !== "string") {
|
|
22948
|
+
throw new Error(
|
|
22949
|
+
`Operator "lt" requires number or string for "${field}"`
|
|
22950
|
+
);
|
|
22951
|
+
}
|
|
22952
|
+
return ["<", getExpr, value];
|
|
22953
|
+
case "ge":
|
|
22954
|
+
if (typeof value !== "number" && typeof value !== "string") {
|
|
22955
|
+
throw new Error(
|
|
22956
|
+
`Operator "ge" requires number or string for "${field}"`
|
|
22957
|
+
);
|
|
22958
|
+
}
|
|
22959
|
+
return [">=", getExpr, value];
|
|
22960
|
+
case "le":
|
|
22961
|
+
if (typeof value !== "number" && typeof value !== "string") {
|
|
22962
|
+
throw new Error(
|
|
22963
|
+
`Operator "le" requires number or string for "${field}"`
|
|
22964
|
+
);
|
|
22965
|
+
}
|
|
22966
|
+
return ["<=", getExpr, value];
|
|
22967
|
+
case "in":
|
|
22968
|
+
if (!Array.isArray(value) || !value.every((x) => typeof x === "string" || typeof x === "number")) {
|
|
22969
|
+
throw new Error(
|
|
22970
|
+
`Operator "in" requires (string | number)[] for "${field}"`
|
|
22971
|
+
);
|
|
22972
|
+
}
|
|
22973
|
+
if (!value.length) {
|
|
22974
|
+
throw new Error(
|
|
22975
|
+
`Operator "in" requires non-empty array for "${field}"`
|
|
22976
|
+
);
|
|
22977
|
+
}
|
|
22978
|
+
return ["in", getExpr, ...value];
|
|
22979
|
+
case "notin":
|
|
22980
|
+
if (!Array.isArray(value) || !value.every((x) => typeof x === "string" || typeof x === "number")) {
|
|
22981
|
+
throw new Error(
|
|
22982
|
+
`Operator "notin" requires (string | number)[] for "${field}"`
|
|
22983
|
+
);
|
|
22984
|
+
}
|
|
22985
|
+
if (!value.length) {
|
|
22986
|
+
throw new Error(
|
|
22987
|
+
`Operator "notin" requires non-empty array for "${field}"`
|
|
22988
|
+
);
|
|
22989
|
+
}
|
|
22990
|
+
return ["!in", getExpr, ...value];
|
|
22991
|
+
case "like":
|
|
22992
|
+
case "ilike":
|
|
22993
|
+
throw new Error(
|
|
22994
|
+
`Operator "${op}" is not supported by server FilterExpression`
|
|
22995
|
+
);
|
|
22996
|
+
default: {
|
|
22997
|
+
const exhaustive = op;
|
|
22998
|
+
throw new Error(`Unsupported operator: ${exhaustive}`);
|
|
22999
|
+
}
|
|
23000
|
+
}
|
|
23001
|
+
}
|
|
23002
|
+
function toGroupExpr(filters) {
|
|
23003
|
+
let logicalOp = "all";
|
|
23004
|
+
const children = [];
|
|
23005
|
+
for (const item of filters) {
|
|
23006
|
+
if (item === "all" || item === "any") {
|
|
23007
|
+
logicalOp = item;
|
|
23008
|
+
continue;
|
|
23009
|
+
}
|
|
23010
|
+
if (isPropertyFilter(item)) {
|
|
23011
|
+
children.push(toConditionExpr(item));
|
|
23012
|
+
continue;
|
|
23013
|
+
}
|
|
23014
|
+
if (isPropertiesFilterGroup(item)) {
|
|
23015
|
+
children.push(toGroupExpr(item));
|
|
23016
|
+
continue;
|
|
23017
|
+
}
|
|
23018
|
+
throw new Error("Invalid PropertiesFilter node");
|
|
23019
|
+
}
|
|
23020
|
+
return [logicalOp, ...children];
|
|
23021
|
+
}
|
|
23022
|
+
function propertiesFilterToExpression(filters) {
|
|
23023
|
+
if (!(filters == null ? void 0 : filters.length)) {
|
|
23024
|
+
return [];
|
|
23025
|
+
}
|
|
23026
|
+
return toGroupExpr(filters);
|
|
23027
|
+
}
|
|
23028
|
+
function propertiesFilterToExpressionString(filters) {
|
|
23029
|
+
if (!(filters == null ? void 0 : filters.length)) {
|
|
23030
|
+
return void 0;
|
|
23031
|
+
}
|
|
23032
|
+
return JSON.stringify(
|
|
23033
|
+
propertiesFilterToExpression(filters)
|
|
23034
|
+
);
|
|
23035
|
+
}
|
|
23036
|
+
|
|
23037
|
+
function createLayerFilterParam(resourceId, filter) {
|
|
23038
|
+
return {
|
|
23039
|
+
[`filter[${resourceId}]`]: propertiesFilterToExpressionString(filter)
|
|
23040
|
+
};
|
|
23041
|
+
}
|
|
23042
|
+
|
|
22959
23043
|
var __defProp$h = Object.defineProperty;
|
|
22960
23044
|
var __defProps$7 = Object.defineProperties;
|
|
22961
23045
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
@@ -22975,6 +23059,18 @@ var NgwLeaflet = (function () {
|
|
|
22975
23059
|
return a;
|
|
22976
23060
|
};
|
|
22977
23061
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
23062
|
+
var __objRest$1 = (source, exclude) => {
|
|
23063
|
+
var target = {};
|
|
23064
|
+
for (var prop in source)
|
|
23065
|
+
if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
23066
|
+
target[prop] = source[prop];
|
|
23067
|
+
if (source != null && __getOwnPropSymbols$a)
|
|
23068
|
+
for (var prop of __getOwnPropSymbols$a(source)) {
|
|
23069
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
|
|
23070
|
+
target[prop] = source[prop];
|
|
23071
|
+
}
|
|
23072
|
+
return target;
|
|
23073
|
+
};
|
|
22978
23074
|
var __publicField$c = (obj, key, value) => __defNormalProp$h(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22979
23075
|
var __async$b = (__this, __arguments, generator) => {
|
|
22980
23076
|
return new Promise((resolve, reject) => {
|
|
@@ -23039,8 +23135,18 @@ var NgwLeaflet = (function () {
|
|
|
23039
23135
|
baseUrl: connector.options.baseUrl || ""
|
|
23040
23136
|
});
|
|
23041
23137
|
if (opt) {
|
|
23042
|
-
const
|
|
23043
|
-
|
|
23138
|
+
const _a = layerOptions.adapterOptions || {}, { propertiesFilter } = _a, restAdapterOptions = __objRest$1(_a, ["propertiesFilter"]);
|
|
23139
|
+
const filterParams = createLayerFilterParam(
|
|
23140
|
+
resourceId,
|
|
23141
|
+
propertiesFilter
|
|
23142
|
+
);
|
|
23143
|
+
const layerAdapterOptions = __spreadProps$7(__spreadValues$9(__spreadValues$9({}, opt), restAdapterOptions), {
|
|
23144
|
+
params: __spreadValues$9({
|
|
23145
|
+
resource: resourceId
|
|
23146
|
+
}, filterParams),
|
|
23147
|
+
url: adapter === "TILE" && opt.url ? updateUrlParams(opt.url, __spreadValues$9({
|
|
23148
|
+
resource: String(resourceId)
|
|
23149
|
+
}, filterParams)) : opt.url,
|
|
23044
23150
|
layers: opt.layers || String(resourceId),
|
|
23045
23151
|
resourceId
|
|
23046
23152
|
});
|
|
@@ -23053,6 +23159,15 @@ var NgwLeaflet = (function () {
|
|
|
23053
23159
|
addLayer(addOptions) {
|
|
23054
23160
|
return super.addLayer(__spreadValues$9(__spreadValues$9({}, this.options), addOptions));
|
|
23055
23161
|
}
|
|
23162
|
+
propertiesFilter(filters) {
|
|
23163
|
+
return __async$b(this, null, function* () {
|
|
23164
|
+
var _a;
|
|
23165
|
+
const opt = this.options;
|
|
23166
|
+
const params = __spreadValues$9(__spreadValues$9({}, opt.params || {}), createLayerFilterParam(this.resourceId, filters));
|
|
23167
|
+
opt.params = params;
|
|
23168
|
+
(_a = this.updateLayer) == null ? void 0 : _a.call(this, { params });
|
|
23169
|
+
});
|
|
23170
|
+
}
|
|
23056
23171
|
getIdentificationIds() {
|
|
23057
23172
|
return __async$b(this, null, function* () {
|
|
23058
23173
|
if (this.item) {
|
|
@@ -23548,7 +23663,8 @@ var NgwLeaflet = (function () {
|
|
|
23548
23663
|
component: "pyramid"
|
|
23549
23664
|
}
|
|
23550
23665
|
});
|
|
23551
|
-
|
|
23666
|
+
const company_logo = settings && "company_logo" in settings ? settings.company_logo : void 0;
|
|
23667
|
+
if (company_logo && company_logo.enabled) {
|
|
23552
23668
|
const anchor = document.createElement("a");
|
|
23553
23669
|
anchor.style.position = "absolute";
|
|
23554
23670
|
anchor.style.bottom = "0";
|
|
@@ -23583,10 +23699,10 @@ var NgwLeaflet = (function () {
|
|
|
23583
23699
|
} else {
|
|
23584
23700
|
return;
|
|
23585
23701
|
}
|
|
23586
|
-
if (
|
|
23587
|
-
anchor.href =
|
|
23702
|
+
if (company_logo.link !== null && company_logo.link.trim() !== "") {
|
|
23703
|
+
anchor.href = company_logo.link;
|
|
23588
23704
|
anchor.target = "_blank";
|
|
23589
|
-
if (
|
|
23705
|
+
if (company_logo.link.search(/:\/\/nextgis/) !== -1) {
|
|
23590
23706
|
img.alt = "Get your own Web GIS at nextgis.com";
|
|
23591
23707
|
}
|
|
23592
23708
|
}
|
|
@@ -26123,7 +26239,7 @@ var NgwLeaflet = (function () {
|
|
|
26123
26239
|
addNgwLayer(options) {
|
|
26124
26240
|
return __async$1(this, null, function* () {
|
|
26125
26241
|
yield this.onMapLoad();
|
|
26126
|
-
const { keyname, resourceId } = options;
|
|
26242
|
+
const { keyname, resourceId, filters } = options;
|
|
26127
26243
|
if (keyname || resourceId !== void 0) {
|
|
26128
26244
|
deprecatedWarn(
|
|
26129
26245
|
"set `resource` options instead of `keyname` or `resourceId`"
|
|
@@ -26137,12 +26253,15 @@ var NgwLeaflet = (function () {
|
|
|
26137
26253
|
}
|
|
26138
26254
|
if (defined(this.options.baseUrl)) {
|
|
26139
26255
|
try {
|
|
26256
|
+
options.adapterOptions = options.adapterOptions || {};
|
|
26140
26257
|
if (defined(this.options.setViewDelay)) {
|
|
26141
|
-
options.adapterOptions = options.adapterOptions || {};
|
|
26142
26258
|
if (!defined(options.adapterOptions.setViewDelay)) {
|
|
26143
26259
|
options.adapterOptions.setViewDelay = this.options.setViewDelay;
|
|
26144
26260
|
}
|
|
26145
26261
|
}
|
|
26262
|
+
if (defined(filters)) {
|
|
26263
|
+
options.adapterOptions.propertiesFilter = filters;
|
|
26264
|
+
}
|
|
26146
26265
|
const adapter = createNgwLayerAdapter(options, this, this.connector);
|
|
26147
26266
|
const adapterOpts = __spreadValues$1(__spreadValues$1({
|
|
26148
26267
|
visibility: true
|
|
@@ -26234,7 +26353,6 @@ var NgwLeaflet = (function () {
|
|
|
26234
26353
|
const promise = fetchIdentifyGeoJson({
|
|
26235
26354
|
identify,
|
|
26236
26355
|
connector: this.connector,
|
|
26237
|
-
multiple,
|
|
26238
26356
|
requestOptions: { signal: abortController.signal }
|
|
26239
26357
|
});
|
|
26240
26358
|
if (promise && "then" in promise) {
|