@nextgis/ngw-leaflet 1.14.0 → 1.15.0

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: 1.14.0; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 1.15.0; author: NextGIS */
2
2
  import 'leaflet/dist/leaflet.css';
3
3
  import { Icon } from 'leaflet';
4
4
  import { NgwMap } from '@nextgis/ngw-map';
@@ -7,7 +7,7 @@ import iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';
7
7
  import iconUrl from 'leaflet/dist/images/marker-icon.png';
8
8
  import shadowUrl from 'leaflet/dist/images/marker-shadow.png';
9
9
 
10
- /*! *****************************************************************************
10
+ /******************************************************************************
11
11
  Copyright (c) Microsoft Corporation.
12
12
 
13
13
  Permission to use, copy, modify, and/or distribute this software for any
@@ -145,10 +145,8 @@ Icon.Default.mergeOptions({
145
145
  var NgwLeaflet = /** @class */ (function (_super) {
146
146
  __extends(NgwLeaflet, _super);
147
147
  function NgwLeaflet(options) {
148
- var _this = this;
149
148
  options = __assign(__assign({}, options), { mapAdapter: new LeafletMapAdapter() });
150
- _this = _super.call(this, options) || this;
151
- return _this;
149
+ return _super.call(this, options) || this;
152
150
  }
153
151
  NgwLeaflet.create = function (options) {
154
152
  return __awaiter(this, void 0, void 0, function () {
@@ -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","/**\n * Single-file bundle for rapid deployment of {@link https://leafletjs.com/ | Leaflet }-based web-gis applications with NextGIS services\n *\n * @remarks\n * Styles images and other assets are already in bundle, you don't need to include anything except one JS file!\n *\n * @packageDocumentation\n * @module ngw-leaflet\n */\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\nimport { Icon } from 'leaflet';\nimport { NgwMap, NgwMapOptions } from '@nextgis/ngw-map';\nimport LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\n\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\nimport { Map } from 'leaflet';\n\n// @ts-ignore\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"],"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OAAO,CAAC,SAAS,CAAC,WAAW,CAAC;AAE1C,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;IACxB,aAAa,EAAE,aAAa;IAC5B,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;IAkByB,8BAAW;IAClC,oBAAY,OAAsB;QAAlC,iBAGC;QAFC,OAAO,yBAAQ,OAAO,KAAE,UAAU,EAAE,IAAI,iBAAiB,EAAE,GAAE,CAAC;QAC9D,QAAA,kBAAM,OAAO,CAAC,SAAC;;KAChB;IACY,iBAAM,GAAnB,UAAoB,OAAsB;;;;gBAClC,MAAM,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;gBACvC,sBAAO,MAAM,CAAC,MAAM,EAAE,EAAC;;;KACxB;IACH,iBAAC;AAAD,CATA,CAAyB,MAAM,GAS9B;AAID,IAAK,MAAc,IAAI,CAAE,MAAc,CAAC,MAAM,EAAE;IAC7C,MAAc,CAAC,MAAM,GAAG,UAAU,CAAC;;;;;"}
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","/**\n * Single-file bundle for rapid deployment of {@link https://leafletjs.com/ | Leaflet }-based web-gis applications with NextGIS services\n *\n * @remarks\n * Styles images and other assets are already in bundle, you don't need to include anything except one JS file!\n *\n * @packageDocumentation\n * @module ngw-leaflet\n */\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\nimport { Icon } from 'leaflet';\nimport { NgwMap, NgwMapOptions } from '@nextgis/ngw-map';\nimport LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\n\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\nimport { Map } from 'leaflet';\n\n// @ts-ignore\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,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AAA,UAAA,kBAAA,UAAA,MAAA,EAAA;IAAyB,SAAW,CAAA,UAAA,EAAA,MAAA,CAAA,CAAA;AAClC,IAAA,SAAA,UAAA,CAAY,OAAsB,EAAA;QAChC,OAAO,GAAA,QAAA,CAAA,QAAA,CAAA,EAAA,EAAQ,OAAO,CAAE,EAAA,EAAA,UAAU,EAAE,IAAI,iBAAiB,EAAE,EAAA,CAAE,CAAC;AAC9D,QAAA,OAAA,MAAA,CAAA,IAAA,CAAA,IAAA,EAAM,OAAO,CAAC,IAAA,IAAA,CAAA;KACf;IACY,UAAM,CAAA,MAAA,GAAnB,UAAoB,OAAsB,EAAA;;;;AAClC,gBAAA,MAAM,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;AACvC,gBAAA,OAAA,CAAA,CAAA,aAAO,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;;;AACxB,KAAA,CAAA;IACH,OAAC,UAAA,CAAA;AAAD,CATA,CAAyB,MAAM,CAS9B,EAAA;AAID,IAAK,MAAc,IAAI,CAAE,MAAc,CAAC,MAAM,EAAE;AAC7C,IAAA,MAAc,CAAC,MAAM,GAAG,UAAU,CAAC;AACrC;;;;"}
@@ -1,16 +1,2 @@
1
- import"leaflet/dist/leaflet.css";import{Icon as t}from"leaflet";import{NgwMap as e}from"@nextgis/ngw-map";import n from"@nextgis/leaflet-map-adapter";import r from"leaflet/dist/images/marker-icon-2x.png";import o from"leaflet/dist/images/marker-icon.png";import a from"leaflet/dist/images/marker-shadow.png";
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var l=function(){return(l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function c(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{c(r.next(t))}catch(e){a(e)}}function l(t){try{c(r.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,l)}c((r=r.apply(t,e||[])).next())}))}function u(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(l){a=[6,l],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}(".ngw-map-container.leaflet-container{background:#fff}.leaflet-pane .leaflet-popup-pane{z-index:9999999999}"),delete t.Default.prototype._getIconUrl,t.Default.mergeOptions({iconRetinaUrl:r,iconUrl:o,shadowUrl:a});var f=function(t){function e(e){return e=l(l({},e),{mapAdapter:new n}),t.call(this,e)||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.create=function(t){return c(this,void 0,void 0,(function(){return u(this,(function(n){return[2,new e(t).onLoad()]}))}))},e}(e);window&&!window.NgwMap&&(window.NgwMap=f);export{f as default};
1
+ import"leaflet/dist/leaflet.css";import{Icon as t}from"leaflet";import{NgwMap as e}from"@nextgis/ngw-map";import n from"@nextgis/leaflet-map-adapter";import r from"leaflet/dist/images/marker-icon-2x.png";import o from"leaflet/dist/images/marker-icon.png";import a from"leaflet/dist/images/marker-shadow.png";var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};var l=function(){return l=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},l.apply(this,arguments)};function c(t,e,n,r){return new(n||(n=Promise))((function(o,a){function i(t){try{c(r.next(t))}catch(e){a(e)}}function l(t){try{c(r.throw(t))}catch(e){a(e)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,l)}c((r=r.apply(t,e||[])).next())}))}function u(t,e){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(l){a=[6,l],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}(".ngw-map-container.leaflet-container{background:#fff}.leaflet-pane .leaflet-popup-pane{z-index:9999999999}"),delete t.Default.prototype._getIconUrl,t.Default.mergeOptions({iconRetinaUrl:r,iconUrl:o,shadowUrl:a});var f=function(t){function e(e){return e=l(l({},e),{mapAdapter:new n}),t.call(this,e)||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.create=function(t){return c(this,void 0,void 0,(function(){return u(this,(function(n){return[2,new e(t).onLoad()]}))}))},e}(e);window&&!window.NgwMap&&(window.NgwMap=f);export{f as default};
16
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","/**\n * Single-file bundle for rapid deployment of {@link https://leafletjs.com/ | Leaflet }-based web-gis applications with NextGIS services\n *\n * @remarks\n * Styles images and other assets are already in bundle, you don't need to include anything except one JS file!\n *\n * @packageDocumentation\n * @module ngw-leaflet\n */\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\nimport { Icon } from 'leaflet';\nimport { NgwMap, NgwMapOptions } from '@nextgis/ngw-map';\nimport LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\n\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\nimport { Map } from 'leaflet';\n\n// @ts-ignore\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","options","mapAdapter","LeafletMapAdapter","_super","__extends","NgwLeaflet","onLoad","NgwMap","window"],"mappings":";;;;;;;;;;;;;;6zDAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,IAC5B,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,2HCAvCe,EAAKC,QAAQC,UAAUC,YAE9BH,EAAKC,QAAQG,aAAa,CACxBC,cAAeA,EACfC,QAASA,EACTC,UAAWA,sBAsBX,WAAYC,UACVA,SAAeA,IAASC,WAAY,IAAIC,IACxCC,YAAMH,SAMV,0PATyBI,MAKVC,SAAb,SAAoBL,sEAElB,SADe,IAAIK,EAAWL,GAChBM,oBAPOC,GAapBC,SAAoBA,OAAeD,SACrCC,OAAeD,OAASF"}
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","/**\n * Single-file bundle for rapid deployment of {@link https://leafletjs.com/ | Leaflet }-based web-gis applications with NextGIS services\n *\n * @remarks\n * Styles images and other assets are already in bundle, you don't need to include anything except one JS file!\n *\n * @packageDocumentation\n * @module ngw-leaflet\n */\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\nimport { Icon } from 'leaflet';\nimport { NgwMap, NgwMapOptions } from '@nextgis/ngw-map';\nimport LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\n\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\nimport { Map } from 'leaflet';\n\n// @ts-ignore\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","_super","options","__assign","mapAdapter","LeafletMapAdapter","call","this","__extends","create","onLoad","NgwMap","window"],"mappings":"miEAAA,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,uHCFOe,EAAKC,QAAQC,UAAUC,YAE9BH,EAAKC,QAAQG,aAAa,CACxBC,cAAeA,EACfC,QAASA,EACTC,UAAWA,IAqBb,IAAAC,EAAA,SAAAC,GACE,SAAAD,EAAYE,GAEV,OADAA,EAAOC,EAAAA,EAAA,GAAQD,GAAS,CAAAE,WAAY,IAAIC,IACxCJ,EAAAK,KAAAC,KAAML,IAAQK,IACf,CAKH,0PATyBC,CAAWR,EAAAC,GAKrBD,EAAMS,OAAnB,SAAoBP,sEAElB,MAAA,CAAA,EADe,IAAIF,EAAWE,GAChBQ,eACf,EACFV,CAAD,CATA,CAAyBW,GAapBC,SAAoBA,OAAeD,SACrCC,OAAeD,OAASX"}