UNPKG

@nextgis/ngw-leaflet

Version:

Single-file bundle for rapid deployment of Leaflet-based web-gis applications with NextGIS services

3 lines (2 loc) 1.75 kB
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}; //# sourceMappingURL=ngw-leaflet.esm-bundler.prod.js.map