@nextgis/ngw-leaflet 3.0.0-alpha.21 → 3.0.0-alpha.22

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.
@@ -11,7 +11,7 @@ function styleInject(css, ref) {
11
11
  if ( ref === void 0 ) ref = {};
12
12
  var insertAt = ref.insertAt;
13
13
 
14
- if (typeof document === 'undefined') { return; }
14
+ if (!css || typeof document === 'undefined') { return; }
15
15
 
16
16
  var head = document.head || document.getElementsByTagName('head')[0];
17
17
  var style = document.createElement('style');
@@ -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,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,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,2 +1,2 @@
1
- import e from"@nextgis/leaflet-map-adapter";import{NgwMap as t}from"@nextgis/ngw-map";import{Icon as r}from"leaflet";import a from"leaflet/dist/images/marker-icon.png";import o from"leaflet/dist/images/marker-icon-2x.png";import n from"leaflet/dist/images/marker-shadow.png";import"leaflet/dist/leaflet.css";!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".ngw-map-container.leaflet-container{background:#fff}.leaflet-pane .leaflet-popup-pane{z-index:9999999999}");var i=Object.defineProperty,l=Object.defineProperties,p=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;delete r.Default.prototype._getIconUrl,r.Default.mergeOptions({iconRetinaUrl:o,iconUrl:a,shadowUrl:n});class m extends t{constructor(t){var r,a;r=((e,t)=>{for(var r in t||(t={}))c.call(t,r)&&f(e,r,t[r]);if(s)for(var r of s(t))d.call(t,r)&&f(e,r,t[r]);return e})({},t),a={mapAdapter:new e},super(t=l(r,p(a)))}static create(e){return t=this,r=null,a=function*(){return new m(e).onLoad()},new Promise(((e,o)=>{var n=e=>{try{l(a.next(e))}catch(t){o(t)}},i=e=>{try{l(a.throw(e))}catch(t){o(t)}},l=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,i);l((a=a.apply(t,r)).next())}));var t,r,a}}window&&!window.NgwMap&&(window.NgwMap=m);export{m as default};
1
+ import e from"@nextgis/leaflet-map-adapter";import{NgwMap as t}from"@nextgis/ngw-map";import{Icon as r}from"leaflet";import a from"leaflet/dist/images/marker-icon.png";import o from"leaflet/dist/images/marker-icon-2x.png";import n from"leaflet/dist/images/marker-shadow.png";import"leaflet/dist/leaflet.css";!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".ngw-map-container.leaflet-container{background:#fff}.leaflet-pane .leaflet-popup-pane{z-index:9999999999}");var i=Object.defineProperty,l=Object.defineProperties,p=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;delete r.Default.prototype._getIconUrl,r.Default.mergeOptions({iconRetinaUrl:o,iconUrl:a,shadowUrl:n});class m extends t{constructor(t){var r,a;r=((e,t)=>{for(var r in t||(t={}))c.call(t,r)&&f(e,r,t[r]);if(s)for(var r of s(t))d.call(t,r)&&f(e,r,t[r]);return e})({},t),a={mapAdapter:new e},super(t=l(r,p(a)))}static create(e){return t=this,r=null,a=function*(){return new m(e).onLoad()},new Promise(((e,o)=>{var n=e=>{try{l(a.next(e))}catch(t){o(t)}},i=e=>{try{l(a.throw(e))}catch(t){o(t)}},l=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,i);l((a=a.apply(t,r)).next())}));var t,r,a}}window&&!window.NgwMap&&(window.NgwMap=m);export{m as default};
2
2
  //# sourceMappingURL=ngw-leaflet.esm-bundler.prod.js.map
@@ -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,2MACvB,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,GAAKF,GAA2B,oBAAbG,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,2MACvB,EAKGC,SAAoBA,OAAeT,SACrCS,OAAeT,OAASD","x_google_ignoreList":[0]}
@@ -32,7 +32,7 @@ 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 ) ;
36
36
  }
37
37
 
38
38
  if (!this._events || this._events === Object.getPrototypeOf(this)._events) {
@@ -14854,7 +14854,7 @@ var NgwLeaflet = (function () {
14854
14854
  }
14855
14855
 
14856
14856
  function round(val, toFixed) {
14857
- const n = 1;
14857
+ const n = toFixed ? Number("1e+" + toFixed) : 1;
14858
14858
  return Math.round((val + Number.EPSILON) * n) / n;
14859
14859
  }
14860
14860
 
@@ -16169,7 +16169,7 @@ var NgwLeaflet = (function () {
16169
16169
  }
16170
16170
  return target;
16171
16171
  };
16172
- var __publicField$H = (obj, key, value) => __defNormalProp$Y(obj, key + "" , value);
16172
+ var __publicField$H = (obj, key, value) => __defNormalProp$Y(obj, typeof key !== "symbol" ? key + "" : key, value);
16173
16173
  class GeoJsonPaint {
16174
16174
  constructor(layer) {
16175
16175
  __publicField$H(this, "layer");
@@ -17003,7 +17003,7 @@ var NgwLeaflet = (function () {
17003
17003
 
17004
17004
  var __defProp$V = Object.defineProperty;
17005
17005
  var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17006
- var __publicField$E = (obj, key, value) => __defNormalProp$V(obj, key + "" , value);
17006
+ var __publicField$E = (obj, key, value) => __defNormalProp$V(obj, typeof key !== "symbol" ? key + "" : key, value);
17007
17007
  class ImageOverlay extends leafletSrcExports.ImageOverlay {
17008
17008
  constructor(imageUrl, bounds, options) {
17009
17009
  super(imageUrl, bounds, options);
@@ -18193,15 +18193,15 @@ var NgwLeaflet = (function () {
18193
18193
  jsdelivr: "lib/ngw-connector.global.prod.js",
18194
18194
  types: "lib/index.d.ts",
18195
18195
  dependencies: {
18196
- "@nextgis/cache": "^3.0.0-alpha.17",
18197
- "@nextgis/cancelable-promise": "^3.0.0-alpha.17",
18198
- "@nextgis/utils": "^3.0.0-alpha.17",
18196
+ "@nextgis/cache": "3.0.0-alpha.17",
18197
+ "@nextgis/cancelable-promise": "3.0.0-alpha.17",
18198
+ "@nextgis/utils": "3.0.0-alpha.17",
18199
18199
  "@types/events": "^3.0.0",
18200
18200
  events: "*",
18201
18201
  "form-data": "^4.0.0"
18202
18202
  },
18203
18203
  devDependencies: {
18204
- "@nextgis/build-tools": "^3.0.0-alpha.17"
18204
+ "@nextgis/build-tools": "3.0.0-alpha.17"
18205
18205
  },
18206
18206
  scripts: {
18207
18207
  clean: "rimraf ./lib",
@@ -18326,7 +18326,7 @@ var NgwLeaflet = (function () {
18326
18326
 
18327
18327
  var __defProp$J = Object.defineProperty;
18328
18328
  var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18329
- var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, key + "" , value);
18329
+ var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
18330
18330
  class NetworkError extends Error {
18331
18331
  constructor(url) {
18332
18332
  super();
@@ -19582,7 +19582,7 @@ var NgwLeaflet = (function () {
19582
19582
 
19583
19583
  var __defProp$C = Object.defineProperty;
19584
19584
  var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19585
- var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, key + "" , value);
19585
+ var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
19586
19586
  class NgwConnectorExtended extends NgwConnector {
19587
19587
  constructor(options) {
19588
19588
  super(options);
@@ -20837,7 +20837,7 @@ var NgwLeaflet = (function () {
20837
20837
  }
20838
20838
  return a;
20839
20839
  };
20840
- var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, key + "" , value);
20840
+ var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
20841
20841
  const _CheckProperty = class _CheckProperty extends BaseProperty {
20842
20842
  constructor(name, item, options) {
20843
20843
  super(name, item, __spreadValues$k(__spreadValues$k({}, _CheckProperty.options), options));
@@ -21047,20 +21047,22 @@ var NgwLeaflet = (function () {
21047
21047
  let ItemProperties = _ItemProperties;
21048
21048
 
21049
21049
  function treeEvery(item, filter, relation, itemPrepare) {
21050
- return !!treeWrapper(item, filter, relation, treeEvery_);
21050
+ return !!treeWrapper(item, filter, relation, treeEvery_, itemPrepare);
21051
21051
  }
21052
21052
  function treeSome(item, filter, relation, itemPrepare) {
21053
- return !!treeWrapper(item, filter, relation, treeFind_);
21053
+ return !!treeWrapper(item, filter, relation, treeFind_, itemPrepare);
21054
21054
  }
21055
21055
  function treeFind(item, filter, relation, itemPrepare) {
21056
- return treeWrapper(item, filter, relation, treeFind_);
21056
+ return treeWrapper(item, filter, relation, treeFind_, itemPrepare);
21057
21057
  }
21058
21058
  function treeFilter(item, filter, relation, itemPrepare) {
21059
21059
  return treeWrapper(
21060
21060
  item,
21061
21061
  filter,
21062
21062
  relation,
21063
- treeFilter_);
21063
+ treeFilter_,
21064
+ itemPrepare
21065
+ );
21064
21066
  }
21065
21067
  function getChildren(item, relation = "children") {
21066
21068
  let children = [];
@@ -21077,6 +21079,13 @@ var NgwLeaflet = (function () {
21077
21079
  }
21078
21080
  function treeWrapper(item, filter = (x) => !!x, relation = "children", treeFunction, itemPrepare) {
21079
21081
  const filterFunction = typeof filter === "function" ? filter : (i) => propertiesFilter(i, filter);
21082
+ if (itemPrepare) {
21083
+ return treeFunction(
21084
+ item,
21085
+ (i) => filterFunction(itemPrepare(i)),
21086
+ relation
21087
+ );
21088
+ }
21080
21089
  return treeFunction(item, filterFunction, relation);
21081
21090
  }
21082
21091
  function treeFind_(item, filterFunc = (x) => !!x, relation, _filtered = []) {