@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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-leaflet; version: 3.1.0; author: NextGIS */
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,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAY,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,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,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXA,OAAO,IAAA,CAAK,QAAQ,SAAU,CAAA,WAAA,CAAA;AAE9B,IAAA,CAAK,QAAQ,YAAa,CAAA;AAAA,EACxB,aAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AACF,CAAC,CAAA,CAAA;AAoBD,MAAM,mBAAmB,MAAY,CAAA;AAAA,EACnC,YAAY,OAAwB,EAAA;AAClC,IAAA,OAAA,GAAU,iCAAK,OAAL,CAAA,EAAA,EAAc,UAAY,EAAA,IAAI,mBAAoB,EAAA,CAAA,CAAA;AAC5D,IAAA,KAAA,CAAM,OAAO,CAAA,CAAA;AAAA,GACf;AAAA,EACA,OAAa,OAAO,OAA6C,EAAA;AAAA,IAAA,OAAA,OAAA,CAAA,IAAA,EAAA,IAAA,EAAA,aAAA;AAC/D,MAAM,MAAA,MAAA,GAAS,IAAI,UAAA,CAAW,OAAO,CAAA,CAAA;AACrC,MAAA,OAAO,OAAO,MAAO,EAAA,CAAA;AAAA,KACvB,CAAA,CAAA;AAAA,GAAA;AACF,CAAA;AAIA,IAAK,MAAA,IAAkB,CAAE,MAAA,CAAe,MAAQ,EAAA;AAC9C,EAAC,OAAe,MAAS,GAAA,UAAA,CAAA;AAC3B;;;;","x_google_ignoreList":[0]}
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,GAnBY,CAqB1D,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,QAAO,yMACvB,EAKGC,SAAoBA,OAAeT,SACrCS,OAAeT,OAASD","x_google_ignoreList":[0]}
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.0; author: NextGIS */
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) {
@@ -18189,63 +18191,7 @@ var NgwLeaflet = (function () {
18189
18191
  let Cache = _Cache;
18190
18192
 
18191
18193
  var pkg = {
18192
- name: "@nextgis/ngw-connector",
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") {
@@ -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$4(_a, ["paramList"]);
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((resources) => {
19450
- if ((requestOptions == null ? void 0 : requestOptions.cache) && resources) {
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
@@ -22477,9 +22424,9 @@ var NgwLeaflet = (function () {
22477
22424
  item
22478
22425
  }) {
22479
22426
  if (item.basemap_layer) {
22480
- const qms = item.basemap_layer.qms;
22481
- const url = item.basemap_layer.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), { url }));
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
  }
@@ -26397,7 +26353,6 @@ var NgwLeaflet = (function () {
26397
26353
  const promise = fetchIdentifyGeoJson({
26398
26354
  identify,
26399
26355
  connector: this.connector,
26400
- multiple,
26401
26356
  requestOptions: { signal: abortController.signal }
26402
26357
  });
26403
26358
  if (promise && "then" in promise) {