Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nextgis/ol-map-adapter

Package Overview
Dependencies
Maintainers
3
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextgis/ol-map-adapter - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

2

lib/index.d.ts

@@ -14,2 +14,3 @@ /// <reference types="node" />

import { Feature, GeoJsonObject } from 'geojson';
import Queue from '@nextgis/queue';
import ImageLayer from 'ol/layer/Image';

@@ -104,2 +105,3 @@ import ImageWMS from 'ol/source/ImageWMS';

options: ImageAdapterOptions;
static queue: Queue;
layer: any;

@@ -106,0 +108,0 @@ constructor(map: Map, options: ImageAdapterOptions);

93

lib/ol-map-adapter.esm-bundler.js

@@ -1,2 +0,2 @@

/** Bundle of @nextgis/ol-map-adapter; version: 2.2.0; author: NextGIS */
/** Bundle of @nextgis/ol-map-adapter; version: 2.2.1; author: NextGIS */
import { EventEmitter } from 'events';

@@ -23,2 +23,3 @@ import Map from 'ol/Map';

import Icon from 'ol/style/Icon';
import Queue from '@nextgis/queue';
import ImageLayer from 'ol/layer/Image';

@@ -1057,17 +1058,30 @@ import CanvasImageLayerRenderer from 'ol/renderer/canvas/ImageLayer';

function setTileLoadFunction(tile, src, headers) {
const xhr = new XMLHttpRequest();
xhr.open("GET", src);
xhr.responseType = "arraybuffer";
for (const h in headers) {
xhr.setRequestHeader(h, headers[h]);
}
xhr.onload = function() {
const arrayBufferView = new Uint8Array(this.response);
const blob = new Blob([arrayBufferView], { type: "image/png" });
const urlCreator = window.URL || window.webkitURL;
const imageUrl = urlCreator.createObjectURL(blob);
tile.getImage().src = imageUrl;
let abort = () => {
};
xhr.send();
return () => xhr.abort();
const img = tile.getImage();
const promise = new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.open("GET", src);
xhr.responseType = "arraybuffer";
for (const h in headers) {
xhr.setRequestHeader(h, headers[h]);
}
xhr.onload = function() {
const arrayBufferView = new Uint8Array(this.response);
const blob = new Blob([arrayBufferView], { type: "image/png" });
const urlCreator = window.URL || window.webkitURL;
const imageUrl = urlCreator.createObjectURL(blob);
img.src = imageUrl;
resolve();
};
xhr.onerror = () => {
reject();
};
xhr.send();
abort = () => {
xhr.abort();
resolve();
};
});
return [promise, abort];
}

@@ -1135,3 +1149,3 @@

}
class ImageAdapter extends BaseAdapter {
const _ImageAdapter = class _ImageAdapter extends BaseAdapter {
constructor(map, options) {

@@ -1179,11 +1193,3 @@ super(map, options);

const updateWmsParams = options.updateWmsParams;
let _abortFunc = void 0;
const abort = () => {
if (_abortFunc) {
_abortFunc();
_abortFunc = void 0;
}
};
return (image, src) => {
abort();
const url = src.split("?")[0];

@@ -1203,13 +1209,10 @@ const query = src.split("?")[1];

const _src = url + "?" + queryString;
if (headers) {
_abortFunc = setTileLoadFunction(image, _src, headers);
} else {
image.getImage().src = _src;
_abortFunc = () => {
image.getImage().src = "";
};
}
_ImageAdapter.queue.add(() => {
return setTileLoadFunction(image, _src, headers);
});
};
}
}
};
__publicField$3(_ImageAdapter, "queue", new Queue({ concurrency: 6, delay: 200 }));
let ImageAdapter = _ImageAdapter;

@@ -1669,21 +1672,2 @@ var __defProp$3 = Object.defineProperty;

}
// requestGeomString(pixel: { top: number, left: number }, pixelRadius = 5) {
// const { top, left } = pixel;
// const olMap = this.map;
// if (olMap) {
// const bounds = boundingExtent([
// olMap.getCoordinateFromPixel([
// left - pixelRadius,
// top - pixelRadius,
// ]),
// olMap.getCoordinateFromPixel([
// left + pixelRadius,
// top + pixelRadius,
// ]),
// ]);
// return new WKT().writeGeometry(
// Polygon.fromExtent(bounds)
// );
// }
// }
_emitMoveEndEvents(from) {

@@ -1742,2 +1726,7 @@ if (this._isLoaded) {

}
map.once("movestart", () => {
map.on("movestart", () => {
ImageAdapter.queue.abort();
});
});
}

@@ -1744,0 +1733,0 @@ }

@@ -1,2 +0,2 @@

import{EventEmitter as t}from"events";import e from"ol/Map";import o from"ol/View";import{transform as i,transformExtent as s,fromLonLat as r}from"ol/proj";import n from"ol/control/Attribution";import a from"@nextgis/control-container";import l from"ol/control/Control";import c from"ol/control/Zoom";import{create as p}from"@nextgis/dom";import{getCoordinates as h,defined as u}from"@nextgis/utils";import m from"ol/Overlay";import d from"ol/format/GeoJSON";import f from"ol/layer/Vector";import y from"ol/source/Vector";import{getCenter as g}from"ol/extent";import b from"polylabel";import{isPaintCallback as v,isPaint as _}from"@nextgis/paint";import{asArray as P}from"ol/color";import{Fill as O,Stroke as w,Style as C,Text as j}from"ol/style";import x from"ol/style/Circle";import E from"ol/style/Icon";import L from"ol/layer/Image";import F from"ol/renderer/canvas/ImageLayer";import S from"ol/source/ImageWMS";import V from"ol/layer/Tile";import A,{ATTRIBUTION as I}from"ol/source/OSM";import M from"ol/source/XYZ";import k from"ol/source/TileWMS";var Z=Object.defineProperty,T=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,B=(t,e,o)=>e in t?Z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,H=(t,e)=>{for(var o in e||(e={}))D.call(e,o)&&B(t,o,e[o]);if(T)for(var o of T(e))R.call(e,o)&&B(t,o,e[o]);return t};const U={collapsible:!1};var G=Object.defineProperty,z=Object.defineProperties,N=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,q=(t,e,o)=>e in t?G(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,J=(t,e)=>{for(var o in e||(e={}))X.call(e,o)&&q(t,o,e[o]);if(W)for(var o of W(e))Y.call(e,o)&&q(t,o,e[o]);return t};const K={collapsible:!1};class Q extends l{constructor(t){const e=new a,o=e.getContainer();var i,s,r;super((i=J(J({},K),t),z(i,N({element:o})))),q(this,"symbol"!=typeof(s="panelContainer")?s+"":s,r),this.panelContainer=e}addControl(t,e){return o=this,i=null,s=function*(){const o=this.getMap();if(o){const i=this.panelContainer.newPositionContainer(e);if(i){const e=yield t,s=e.element;s&&s.classList.add("webmap-ctrl"),e.setTarget(i),o.addControl(e)}}},new Promise(((t,e)=>{var r=t=>{try{a(s.next(t))}catch(o){e(o)}},n=t=>{try{a(s.throw(t))}catch(o){e(o)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,n);a((s=s.apply(o,i)).next())}));var o,i,s}removeControl(t){const e=this.getMap();e&&e.removeControl(t)}getContainer(){return this.panelContainer.getContainer()}}function $(t){const e=document.createElement("button");e.className="custom-button-control","string"==typeof t.html?e.innerHTML=t.html:t.html instanceof HTMLElement&&e.appendChild(t.html),"string"==typeof t.title&&(e.title=t.title);const o=document.createElement("div");return o.className=(t.addClass?t.addClass+" ":"")+"ol-unselectable webmap-ctrl-group",o.appendChild(e),o}function tt(t,e="EPSG:3857",o="EPSG:4326"){const[s,r]=i(t.coordinate,e,o);return{latLng:{lat:r,lng:s},lngLat:[s,r],pixel:{left:t.pixel[0],top:t.pixel[1]},source:t}}function et(t){const e=function({feature:t,dataProjection:e,featureProjection:o}){const i=(new d).readFeatures({type:"FeatureCollection",features:Array.isArray(t)?t:[t]},{dataProjection:e,featureProjection:o}),s=new y;return s.addFeatures(i),s}(t),o=e.getExtent(),i=s(o,t.featureProjection,t.dataProjection);return e.dispose(),i}function ot(t){return{getBounds:()=>et(t),getCenter:()=>function(t){const e=et(t);return g(e)}(t)}}const it=90.71446714322,st=39.37;function rt(t,e){const o={minZoom:e.minZoom,maxZoom:e.maxZoom};return e.maxScale&&(o.minResolution=nt(t,e.maxScale)),e.minScale&&(o.maxResolution=nt(t,e.minScale)),o}function nt(t,e){if(e)return function(t,e){return t/(e*st*it)}(e,t.getView().getProjection().getMetersPerUnit()||1)}function at(t){return(new d).writeFeatureObject(t,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"})}function lt(t){const e=decodeURIComponent,o=t.split("&"),i={};let s,r;for(let n,a=0,l=o.length;a<l;++a)if(n=o[a],n.length){const t=n.indexOf("=");t<0?(s=e(n),r=""):(s=e(n.slice(0,t)),r=e(n.slice(t+1))),"string"==typeof i[s]&&(i[s]=[i[s]]),Array.isArray(i[s])?i[s].push(r):i[s]=r}return i}function ct(t,e){const o=[];let i;for(i in t){const s=e?e+"["+i+"]":i,r=t[i];o.push(null!==r&&"object"==typeof r?ct(r,s):encodeURIComponent(s)+"="+encodeURIComponent(r))}return o.join("&")}var pt=Object.defineProperty,ht=Object.defineProperties,ut=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,yt=(t,e,o)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,gt=(t,e)=>{for(var o in e||(e={}))dt.call(e,o)&&yt(t,o,e[o]);if(mt)for(var o of mt(e))ft.call(e,o)&&yt(t,o,e[o]);return t};const bt={Point:"point",MultiPoint:"point",LineString:"line",MultiLineString:"line",Polygon:"polygon",MultiPolygon:"polygon",Circle:"point"},vt={polygon:"path",line:"path",point:"circle"};function _t(t,e){const o=P(t).slice();return o[3]=void 0!==e?e:1,o}function Pt(t,e={}){if(v(e)){return Pt(t,e(at(t)))}if(_(e)){const o=t.getGeometry(),i=o&&o.getType()||"Point",s={};if(!e.type){const t=bt[i],o="polygon"===t||"line"===t?"path":"html"in e||"className"in e?"icon":vt[t];o&&(e.type=o)}if("path"===e.type||"circle"===e.type){const{radius:t,fill:o,fillColor:r,fillOpacity:n,strokeColor:a,stroke:l,strokeOpacity:c}=gt({},e);o&&r&&"string"==typeof r&&"number"==typeof n&&(s.fill=new O({color:_t(r,n)})),a&&"string"==typeof a&&"number"==typeof c&&(l||-1!==["MultiLineString","LineString"].indexOf(i))&&(s.stroke=new w({width:e.weight,color:_t(a,c)})),"circle"===e.type&&"number"==typeof t&&(s.image=new x(gt({radius:t},s)))}else if("icon"===e.type){const t=e.html;if(t){const o={src:"data:image/svg+xml,"+encodeURIComponent(t),anchorXUnits:"pixels",anchorYUnits:"pixels",anchor:e.iconAnchor,rotation:e.rotate};s.image=new E(o)}}return new C(s)}}function Ot(t,e){let o={font:"12px Calibri,sans-serif",overflow:!0,fill:new O({color:"#000"}),stroke:new w({color:"#fff",width:3})};var i;return"point"===t&&(i=gt({},o),o=ht(i,ut({placement:"point",textBaseline:"bottom",offsetY:20}))),new C({text:new j(o)})}var wt=Object.defineProperty,Ct=(t,e,o)=>(((t,e,o)=>{e in t?wt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o})(t,"symbol"!=typeof e?e+"":e,o),o);class jt{constructor(t,e){this.map=t,this.options=e,Ct(this,"layer")}setOpacity(t){this.options.opacity=Number(t),this.layer&&this.layer.setOpacity&&this.layer.setOpacity(this.options.opacity)}}var xt=Object.defineProperty,Et=Object.defineProperties,Lt=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable,At=(t,e,o)=>e in t?xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,It=(t,e)=>{for(var o in e||(e={}))St.call(e,o)&&At(t,o,e[o]);if(Ft)for(var o of Ft(e))Vt.call(e,o)&&At(t,o,e[o]);return t},Mt=(t,e,o)=>(At(t,"symbol"!=typeof e?e+"":e,o),o);function kt(t,e,o){const i=new XMLHttpRequest;i.open("GET",e),i.responseType="arraybuffer";for(const s in o)i.setRequestHeader(s,o[s]);return i.onload=function(){const e=new Uint8Array(this.response),o=new Blob([e],{type:"image/png"}),i=(window.URL||window.webkitURL).createObjectURL(o);t.getImage().src=i},i.send(),()=>i.abort()}var Zt=Object.defineProperty,Tt=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Bt=(t,e,o)=>e in t?Zt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Ht=(t,e)=>{for(var o in e||(e={}))Dt.call(e,o)&&Bt(t,o,e[o]);if(Tt)for(var o of Tt(e))Rt.call(e,o)&&Bt(t,o,e[o]);return t};class Ut extends L{constructor(t,e){super(t),this.ratio=e}createRenderer(){return new zt(this,this.ratio)}}class Gt extends S{constructor(t,e){super(t),this.ratio=e}getImageInternal(t,e,o,i){return super.getImageInternal(t,e,this.ratio,i)}}class zt extends F{constructor(t,e){super(t),this.ratio=e}renderFrame(t,e){return t.pixelRatio=this.ratio,super.renderFrame(t,e)}}var Nt=Object.defineProperty,Wt=Object.getOwnPropertySymbols,Xt=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,qt=(t,e,o)=>e in t?Nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var Jt=Object.defineProperty,Kt=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,te=(t,e,o)=>e in t?Jt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,ee=(t,e)=>{for(var o in e||(e={}))Qt.call(e,o)&&te(t,o,e[o]);if(Kt)for(var o of Kt(e))$t.call(e,o)&&te(t,o,e[o]);return t};var oe=Object.defineProperty,ie=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,ne=(t,e,o)=>e in t?oe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,ae=(t,e)=>{for(var o in e||(e={}))se.call(e,o)&&ne(t,o,e[o]);if(ie)for(var o of ie(e))re.call(e,o)&&ne(t,o,e[o]);return t};var le=Object.defineProperty,ce=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,de=(t,e,o)=>e in t?le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,fe=(t,e)=>{for(var o in e||(e={}))ue.call(e,o)&&de(t,o,e[o]);if(he)for(var o of he(e))me.call(e,o)&&de(t,o,e[o]);return t},ye=(t,e,o)=>(de(t,"symbol"!=typeof e?e+"":e,o),o);const ge=class n{constructor(){ye(this,"options",{target:"map"}),ye(this,"layerAdapters",n.layerAdapters),ye(this,"controlAdapters",n.controlAdapters),ye(this,"emitter",new t),ye(this,"map"),ye(this,"displayProjection","EPSG:3857"),ye(this,"lonlatProjection","EPSG:4326"),ye(this,"_mapClickEvents",[]),ye(this,"_forEachFeatureAtPixel",[]),ye(this,"_unselectCb",[]),ye(this,"_olView"),ye(this,"_panelControl"),ye(this,"_isLoaded",!1),ye(this,"_positionMem",{})}create(t){this.options=fe({},t);const i=this.getViewOptions(this.options),s={controls:[],view:new o(i),layers:[]};t.mapAdapterOptions&&Object.assign(s,t.mapAdapterOptions);const r=(n=fe({},s),ce(n,pe({target:this.options.target||"map"})));var n;this.map=this.options.map||new e(r),this._panelControl=new Q,this.map.addControl(this._panelControl),this.map.set("_mapClickEvents",this._mapClickEvents),this.map.set("_forEachFeatureAtPixel",this._forEachFeatureAtPixel),this.map.set("_addUnselectCb",(t=>this._addUnselectCb(t))),this.emitter.emit("create",this),this._olView=this.map.getView(),this._isLoaded=!0,this._addMapListeners(),this._addViewListeners()}destroy(){this.map&&this.map.dispose()}getContainer(){if(this.options.target){let t;return"string"==typeof this.options.target?t=document.getElementById(this.options.target):this.options.target instanceof HTMLElement&&(t=this.options.target),t}}getControlContainer(){if(this._panelControl)return this._panelControl.getContainer();throw new Error("The ol-map-adapter ControlPanel has not been initialized yet")}setCenter(t){this._olView&&this._olView.setCenter(r(t))}getCenter(){if(this._olView){const t=this._olView.getCenter();if(t){return i(t,this.displayProjection,this.lonlatProjection)}}}setZoom(t){this._olView&&this._olView.setZoom(t)}getZoom(){if(this._olView)return this._olView.getZoom()}fitBounds(t,e={}){if(this._olView){const{padding:o,maxZoom:i,offset:r}=e,n=this.getZoom(),a=s(t,this.lonlatProjection,this.displayProjection),l={};i&&(l.maxZoom=i),o&&(l.padding=[o,o]),r&&(l.padding=r),this._olView.fit(a,l),this._emitMoveEndEvents({zoom:n})}}getBounds(){if(!this._olView)return;const t=this._olView.calculateExtent();return s(t,this.displayProjection,this.lonlatProjection)}setRotation(t){this._olView&&this._olView.setRotation(t)}setView(t,e){if(this.map)if(Array.isArray(t)){this._setView({zoom:e,center:r(t)})}else{const{bounds:e}=t,o=this.getViewOptions(t);Object.values(o).some(Boolean)&&this._setView(o),e&&this.fitBounds(e)}}removeLayer(t){this.map&&this.map.removeLayer(t)}showLayer(t){if(this.map){const e=this.map.getLayers();for(const o of e.getArray())if(o===t)return void("production"!==process.env.NODE_ENV&&console.warn("DEV: OL layer already added"));this.map.addLayer(t)}}hideLayer(t){this.map&&this.map.removeLayer(t)}setLayerOpacity(t,e){t.setOpacity&&t.setOpacity(Number(e))}setLayerOrder(t,e){t&&t.setZIndex&&t.setZIndex(e)}createControl(t,e){return function(t,e={},o){return new class extends l{constructor(){const i=document.createElement("div");i.className=(e.addClass?e.addClass+" ":"")+"ol-unselectable"+(e.bar?" webmap-ctrl-group":"")+(e.margin?" ol-control-margin":"");const s=t.onAdd(o);s&&i.appendChild(s),super({element:i})}}}(t,e,this)}createButtonControl(t){return function(t){return new class extends l{constructor(){super({element:$(t)}),t.onClick&&this.element.querySelector("button").addEventListener("click",t.onClick,!1)}handleRotateNorth(){var t;null==(t=this.getMap())||t.getView().setRotation(0)}}}(t)}addControl(t,e){if(this._panelControl)return this._panelControl.addControl(t,e),t}removeControl(t){this._panelControl&&this._panelControl.removeControl(t)}onMapClick(t){const e=tt(t);this.emitter.emit("preclick",e);this._callEachFeatureAtPixel(t,"click")||this._mapClickEvents.forEach((e=>{e(t)})),this.emitter.emit("click",e)}getViewOptions(t){const{zoom:e,center:o,maxBounds:i,minZoom:n,maxZoom:a}=t,l={zoom:e,minZoom:n,maxZoom:a,projection:this.displayProjection};if(o&&(l.center=r(o)),i){const t=s(i,this.lonlatProjection,this.displayProjection);l.extent=t}return l}_callEachFeatureAtPixel(t,e){if(t&&t.pixel&&this._forEachFeatureAtPixel.length&&this.map){const o=this._forEachFeatureAtPixel.sort(((t,e)=>e[0]-t[0]));for(const i of o){if(i[1](t.pixel,t,e))return!0}}return!1}_emitMoveEndEvents(t){if(this._isLoaded){const e=this.getZoom();t.zoom!==e&&this.emitter.emit("zoomend")}}_addMapListeners(){const t=this.map;if(t){const e=t.getViewport();t.on("click",(t=>{this.onMapClick(t)})),t.on("pointermove",(t=>{this.emitter.emit("mousemove",tt(t)),this._callEachFeatureAtPixel(t,"hover")}));const o=e=>{const o=[e.x,e.y],i=t.getCoordinateFromPixel(o);if(i){return tt(fe({pixel:o,coordinate:i},e))}};e.addEventListener("mouseout",(t=>{this.emitter.emit("mouseout",o(t))}),!1),e.addEventListener("mouseover",(t=>{this.emitter.emit("mouseover",o(t))}),!1);const i=this.getCenter(),s=this.getZoom(),r=["movestart","moveend"];for(const n of r)this._positionMem[n]={center:i,zoom:s},t.on(n,(()=>{this._emitPositionChangeEvent(n)}))}}_addViewListeners(){this._olView&&(this._olView.on("change:resolution",(()=>{this.emitter.emit("zoom",this)})),this._olView.on("change:center",(()=>{this.emitter.emit("move",this)})))}_setView(t){const{center:e,zoom:i,extent:s,minZoom:r,maxZoom:n}=t,a=this.map;if(!a)return;const l=a.getView();if(void 0!==s){l.dispose();const e=new o(t);this._olView=e,this._addViewListeners(),a.setView(e)}else e&&l.setCenter(e),void 0!==i&&l.setZoom(i),void 0!==r&&l.setMinZoom(r),void 0!==n&&l.setMaxZoom(n)}_addUnselectCb(t){for(const e of this._unselectCb)e();this._unselectCb.length=0,this._unselectCb.push(t)}_emitPositionChangeEvent(t){const e=this._positionMem[t];let o,i;e&&(o=e.center,i=e.zoom);const s=this.getCenter(),r=this.getZoom();if(i!==r){this.emitter.emit("movestart"===t?"zoomstart":"zoomend",this)}if(o&&s){const[e,i]=s,[r,n]=o;e===r&&i===n||this.emitter.emit(t,this)}else o!==s&&this.emitter.emit(t,this);this._positionMem[t]={center:s,zoom:r}}};ye(ge,"layerAdapters",{IMAGE:class extends jt{constructor(t,e){var o,i;super(t,e),this.map=t,this.options=e,Bt(this,"symbol"!=typeof(o="layer")?o+"":o,i)}addLayer(t){if(Object.assign(this.options,t),t.url){const e=void 0!==t.ratio?t.ratio:1,o={url:t.url,params:Ht({},t.params),projection:void 0,imageLoadFunction:this.constructImageLoadFunction(t)},i=Ht(Ht({opacity:t.opacity},rt(this.map,t)),t.nativeOptions);if(e>1){o.ratio=e,o.serverType="mapserver";const t=new Gt(o,e),s=new Ut(Ht({source:t},i),e);this.layer=s}else{const t=new S(o),e=new L(Ht({source:t},i));this.layer=e}return this.layer}}constructImageLoadFunction(t){const e=t.updateWmsParams;let o;return(i,s)=>{o&&(o(),o=void 0);const r=s.split("?")[0],n=lt(s.split("?")[1]),{resource:a,BBOX:l,WIDTH:c,HEIGHT:p}=n,h=((t,e)=>{var o={};for(var i in t)Dt.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&Tt)for(var i of Tt(t))e.indexOf(i)<0&&Rt.call(t,i)&&(o[i]=t[i]);return o})(n,["resource","BBOX","WIDTH","HEIGHT"]),u=Ht({resource:a,bbox:l,width:c,height:p},h),m=ct(e?e(u):h),d=t.headers,f=r+"?"+m;d?o=kt(i,f,d):(i.getImage().src=f,o=()=>{i.getImage().src=""})}}},TILE:class extends jt{constructor(t,e){super(t,e),this.map=t,this.options=e}addLayer(t){Object.assign(this.options,t);const e=function(t,e){const o=[],i="string"==typeof e?e.split(""):e;return(null==i?void 0:i.length)?i.forEach((e=>{o.push(t.replace(/{s}/,e))})):o.push(t),o}(t.url,t.subdomains),o={attributions:t.attribution?[t.attribution]:[],urls:e};t.crossOrigin&&(o.crossOrigin=t.crossOrigin);const i=new M(o),s=t.headers;s&&i.setTileLoadFunction(((t,e)=>{kt(t,e,s)}));return new V(ee(ee({source:i,opacity:t.opacity},rt(this.map,t)),t.nativeOptions))}},WMS:class extends jt{constructor(t,e){var o,i;super(t,e),this.map=t,this.options=e,ne(this,"symbol"!=typeof(o="layer")?o+"":o,i)}addLayer(t){Object.assign(this.options,t);const e={url:t.url,params:{LAYERS:t.layers,VERSION:t.version},projection:void 0},o=t.updateWmsParams;o&&(e.tileLoadFunction=(e,i)=>{const s=i.split("?")[0],r=i.split("?")[1],{resource:n,BBOX:a,WIDTH:l,HEIGHT:c}=lt(r),p=ct(o({resource:n,bbox:a,width:l,height:c})),h=t.headers,u=s+"?"+p;h?kt(e,u,h):e.getImage().src=u});const i=new k(e),s=new V(ae(ae({source:i,opacity:t.opacity},rt(this.map,t)),t.nativeOptions));return this.layer=s,s}},OSM:class extends jt{constructor(t,e){var o;super(t,e),this.map=t,this.options=e,qt(this,"symbol"!=typeof(o="name")?o+"":o,"OpenStreetMap")}addLayer(t){Object.assign(this.options,t),this.options.name=this.name;return new V(((t,e)=>{for(var o in e||(e={}))Xt.call(e,o)&&qt(t,o,e[o]);if(Wt)for(var o of Wt(e))Yt.call(e,o)&&qt(t,o,e[o]);return t})({source:new A({attributions:[I]})},t.nativeOptions))}},GEOJSON:class extends jt{constructor(t,e){var o;super(t,e),this.map=t,this.options=e,Mt(this,"layer"),Mt(this,"paint"),Mt(this,"selectedPaint"),Mt(this,"selected",!1),Mt(this,"displayProjection","EPSG:3857"),Mt(this,"lonlatProjection","EPSG:4326"),Mt(this,"vectorSource",new y),Mt(this,"_features",[]),Mt(this,"_selectedFeatures",[]),Mt(this,"_filterFun"),Mt(this,"_mouseOver"),Mt(this,"_openedPopup",[]),Mt(this,"_forEachFeatureAtPixel",[]),Mt(this,"_mapClickEvents",[]),Mt(this,"_styleCache",{}),Mt(this,"_labelVisibility",!0),this._labelVisibility=null!=(o=e.labelVisibility)?o:this._labelVisibility,this.displayProjection=t.getView().getProjection().getCode()}get addUnselectCb(){return this.map.get("_addUnselectCb")}get mapClickEvents(){return this.map.get("_mapClickEvents")}get forEachFeatureAtPixel(){return this.map.get("_forEachFeatureAtPixel")}addLayer(t){var e;Object.assign(this.options,t),this.paint=t.paint,this.selectedPaint=t.selectedPaint;const o=t.data;o&&this.addData(o),this.layer=new f(It(It({source:this.vectorSource,style:e=>this._getFeatureStyle(e,t.paint||{},t.type)},rt(this.map,t)),t.nativeOptions));return(null==(e=t.interactive)||e)&&this._addEventListener(),this.layer}beforeRemove(){const t=this.forEachFeatureAtPixel;for(let o=t.length;o--;){const e=t[o][1];-1!==t.findIndex((t=>t[1]===e))&&t.splice(o,1)}this._forEachFeatureAtPixel.length=0;const e=this.mapClickEvents;for(let o=e.length;o--;){-1!==e.indexOf(e[o])&&e.splice(o,1)}this._mapClickEvents.length=0,this._removeAllPopup()}clearLayer(t){if(this.unselect(),t){const e=this.vectorSource.getFeatures().values();let o;for(;!(o=e.next()).done;){t(at(o.value))&&this.vectorSource.removeFeature(o.value)}}else this.vectorSource.clear()}setData(t){this.clearLayer(),this.addData(t)}addData(t){const e=this.options.srs,o="EPSG:"+(null!=e?e:"4326"),i=(new d).readFeatures(t,{dataProjection:o,featureProjection:this.displayProjection});if(this._features=this._features.concat(i),this._filterFun)this.filter(this._filterFun);else if(this.vectorSource.addFeatures(i),this.options.popup)for(const s of this._features)this._openPopup({feature:s,type:"api",options:this.options.popupOptions})}select(t){if(this.unselect(),"function"==typeof t){const e=this._features.filter((e=>t(this._createLayerDefOpts(at(e)))));for(const t of e)this._selectFeature(t)}else this.selected||(this.selected=!0,this.selectedPaint&&this._setPaintEachLayer(this.selectedPaint))}unselect(t){let e=this._selectedFeatures;"function"==typeof t?e=this._selectedFeatures.filter((e=>t(this._createLayerDefOpts(at(e))))):this.selected&&(this.selected=!1);for(const o of e)this._unselectFeature(o);this._removeAllPopup()}getLayers(){return this._features.map((t=>this._createLayerDefOpts(at(t))))}getSelected(){return this._selectedFeatures.map((t=>this._createLayerDefOpts(at(t))))}filter(t){this._filterFun=t;const e=this._features,o=t?e.filter((e=>t(this._createLayerDefOpts(at(e))))):e;this.vectorSource.clear();const i=o.length;for(let s=0;s<i;s++)this.vectorSource.addFeature(o[s]);return o.map((t=>this._createLayerDefOpts(at(t))))}cleanFilter(){this.filter()}getExtent(){return this.getBounds()}getBounds(){if(this.layer){const t=this.layer.getSource();if(t){const e=t.getExtent();return s(e,this.displayProjection,this.lonlatProjection)}}}setPaint(t){t&&(this.paint=t,this._setPaintEachLayer(this.paint))}setSelectedPaint(t){t&&(this.selectedPaint=t,this._setPaintEachLayer(this.selectedPaint))}updatePaint(t){this.paint=It(It({},this.paint),t),this._setPaintEachLayer(this.paint)}updateSelectedPaint(t){this.selectedPaint=It(It({},this.selectedPaint),t),this._setPaintEachLayer(this.selectedPaint)}isLabelVisible(){return this._labelVisibility}hideLabel(){this._toggleLabel(!1)}showLabel(){this._toggleLabel(!0)}_toggleLabel(t){this._labelVisibility=t,this.updatePaint({})}_createLayerDefOpts(t){return It({target:this,feature:t},ot({feature:t,dataProjection:this.lonlatProjection,featureProjection:this.displayProjection}))}_getFeatureStyle(t,e,o="polygon"){var i;const s=[],r=t.getId(),n=void 0!==r&&this._styleCache[r];if(n)return n;const a=Pt(t,e);if(a&&s.push(a),this._labelVisibility){const{labelField:e,label:r}=this.options;let n="";if("string"==typeof e?n=t.get(e):r&&(n=r(this._createLayerDefOpts(at(t)))),n=String(n),n){const t=u(n)?n:"";if(t){const e=Ot(o);null==(i=e.getText())||i.setText(t),s.push(e)}}}return void 0!==r&&(this._styleCache[r]=s),s}_setPaintEachLayer(t){if(this._styleCache={},this.layer){const e=this.layer.getSource();if(e){const o=e.getFeatures();for(const e of o){const o=this._getFeatureStyle(e,t,this.options.type);o&&e.setStyle(o)}}}}_addEventListener(){var t;const e=this.forEachFeatureAtPixel,o=[this.options.order||0,(t,e,o)=>this._onFeatureAtPixel(t,e,o)];this._forEachFeatureAtPixel.push(o),e.push(o);(null==(t=this.options.unselectOnClick)||t)&&(this._mapClickEvents.push((()=>this.unselect())),this.mapClickEvents.push((()=>this.unselect())))}_onFeatureAtPixel(t,e,o){const i=t&&this.map.getFeaturesAtPixel(t,{layerFilter:t=>t===this.layer})[0],s=(t=>({layer:this,event:tt(t),source:t}))(e);if(i){const t=It(It({},s),this._createLayerDefOpts(at(i)));let e=-1!==this._selectedFeatures.indexOf(i);return this.options.selectable&&("hover"===o&&this.options.selectOnHover||"click"===o)&&(e?this.options&&this.options.unselectOnSecondClick&&(this._unselectFeature(i),e=!1):(this._selectFeature(i,t.event.lngLat),e=!0)),"click"===o&&this.options.onClick&&this.options.onClick(It({selected:e},t)),"hover"===o&&(this._mouseOver=!0,this.options.onMouseOver&&this.options.onMouseOver(t)),!0}return"hover"===o&&this._mouseOver&&(this._mouseOver=!1,this.options.onMouseOut&&this.options.onMouseOut(s),this.options.selectOnHover&&this.unselect()),!1}_selectFeature(t,e){const{multiselect:o,selectedPaint:i,popupOptions:s,popupOnSelect:r,onSelect:n}=this.options||{},a=e?"click":"api";if(!o){this.addUnselectCb((()=>this._unselectFeature(t)));for(const t of this._selectedFeatures)this._unselectFeature(t)}if(this._selectedFeatures.push(t),this.selected=!0,i){const e=Pt(t,i);e&&t.setStyle(e)}if(r&&this._openPopup({coordinates:e,feature:t,options:s,type:"click"}),n){const e=at(t);n(It({layer:this,features:[],type:a},ot({feature:e,dataProjection:this.lonlatProjection,featureProjection:this.displayProjection})))}}_unselectFeature(t){const e=this._selectedFeatures.indexOf(t);if(-1!==e){this._selectedFeatures.splice(e,1);const o=this._openedPopup.find((e=>e[0]===t));o&&this._removePopup(o[1])}if(this.selected=this._selectedFeatures.length>0,this.options&&this.options.paint){const e=Pt(t,this.options.paint);e&&t.setStyle(e)}}_openPopup(t){return e=this,o=arguments,s=function*({coordinates:t,feature:e,options:o={},type:s}){const r=this.map;if(!r)return;let n;const a=[],l=()=>{n&&this._removePopup(n)},{createPopupContent:c,popupContent:p}=o,u=at(e),d=c?yield c(It({close:l,onClose:t=>{a.push(t)},type:s},this._createLayerDefOpts(u))):p;if(t=t||u&&function(t){return"Polygon"===t.geometry.type?b(t.geometry.coordinates):"Point"===t.geometry.type?t.geometry.coordinates:(e=h(t)).reduce(((t,o)=>[t[0]+o[0]/e.length,t[1]+o[1]/e.length]),[0,0]);var e}(u),d&&t){const s="string"==typeof d?function(t){const e=document.createElement("div");return e.innerHTML=t,e}(d):d,c=this._createPopupElement((f=It({},o),Et(f,Lt({popupContent:s,close:l}))));n=new m({element:c}),n.setPosition(i(t,this.lonlatProjection,this.displayProjection)),r.addOverlay(n),this._openedPopup.push([e,n,a])}var f},new Promise(((t,i)=>{var r=t=>{try{a(s.next(t))}catch(e){i(e)}},n=t=>{try{a(s.throw(t))}catch(e){i(e)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,n);a((s=s.apply(e,o)).next())}));var e,o,s}_createPopupElement({closeButton:t,popupContent:e,maxWidth:o,minWidth:i,close:s}){t=null!=t?t:!this.options.selectOnHover;const r=p("div","ol-popup");if(o&&(r.style.maxWidth=o+"px"),i&&(r.style.minWidth=i+"px"),t){const t=p("a","ol-popup-closer",r);t.setAttribute("href","#"),t.addEventListener("click",s)}return p("div","popup-content",r).appendChild(e),r}_removeAllPopup(){const t=[...this._openedPopup];this._openedPopup=[];for(const e of t)this._removePopup(e[1])}_removePopup(t){var e,o;const i=this.map;if(i){i.removeOverlay(t);const s=this._openedPopup.findIndex((e=>e[1]===t));if(-1!==s){const[t,,i]=this._openedPopup[s],r=null==(o=null==(e=this.options.popupOptions)?void 0:e.unselectOnClose)||o;for(const e of i)e(this._createLayerDefOpts(at(t)));i.length=0,r&&this._unselectFeature(t),this._openedPopup.splice(s,1)}}}}}),ye(ge,"controlAdapters",{ZOOM:class extends c{constructor(...t){super(...t),this.element.classList.remove("ol-control"),this.element.classList.add("webmap-ctrl-group")}},ATTRIBUTION:class extends n{constructor(t){super(H(H({},U),t))}}});let be=ge;export{be as default};
import{EventEmitter as t}from"events";import e from"ol/Map";import o from"ol/View";import{transform as i,transformExtent as s,fromLonLat as r}from"ol/proj";import n from"ol/control/Attribution";import a from"@nextgis/control-container";import l from"ol/control/Control";import c from"ol/control/Zoom";import{create as p}from"@nextgis/dom";import{getCoordinates as h,defined as u}from"@nextgis/utils";import m from"ol/Overlay";import d from"ol/format/GeoJSON";import f from"ol/layer/Vector";import y from"ol/source/Vector";import{getCenter as g}from"ol/extent";import b from"polylabel";import{isPaintCallback as v,isPaint as _}from"@nextgis/paint";import{asArray as P}from"ol/color";import{Fill as O,Stroke as w,Style as C,Text as j}from"ol/style";import x from"ol/style/Circle";import E from"ol/style/Icon";import L from"@nextgis/queue";import F from"ol/layer/Image";import S from"ol/renderer/canvas/ImageLayer";import V from"ol/source/ImageWMS";import A from"ol/layer/Tile";import I,{ATTRIBUTION as M}from"ol/source/OSM";import k from"ol/source/XYZ";import Z from"ol/source/TileWMS";var T=Object.defineProperty,D=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,H=(t,e,o)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,U=(t,e)=>{for(var o in e||(e={}))R.call(e,o)&&H(t,o,e[o]);if(D)for(var o of D(e))B.call(e,o)&&H(t,o,e[o]);return t};const G={collapsible:!1};var z=Object.defineProperty,N=Object.defineProperties,W=Object.getOwnPropertyDescriptors,q=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,J=(t,e,o)=>e in t?z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,K=(t,e)=>{for(var o in e||(e={}))X.call(e,o)&&J(t,o,e[o]);if(q)for(var o of q(e))Y.call(e,o)&&J(t,o,e[o]);return t};const Q={collapsible:!1};class $ extends l{constructor(t){const e=new a,o=e.getContainer();var i,s,r;super((i=K(K({},Q),t),N(i,W({element:o})))),J(this,"symbol"!=typeof(s="panelContainer")?s+"":s,r),this.panelContainer=e}addControl(t,e){return o=this,i=null,s=function*(){const o=this.getMap();if(o){const i=this.panelContainer.newPositionContainer(e);if(i){const e=yield t,s=e.element;s&&s.classList.add("webmap-ctrl"),e.setTarget(i),o.addControl(e)}}},new Promise(((t,e)=>{var r=t=>{try{a(s.next(t))}catch(o){e(o)}},n=t=>{try{a(s.throw(t))}catch(o){e(o)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,n);a((s=s.apply(o,i)).next())}));var o,i,s}removeControl(t){const e=this.getMap();e&&e.removeControl(t)}getContainer(){return this.panelContainer.getContainer()}}function tt(t){const e=document.createElement("button");e.className="custom-button-control","string"==typeof t.html?e.innerHTML=t.html:t.html instanceof HTMLElement&&e.appendChild(t.html),"string"==typeof t.title&&(e.title=t.title);const o=document.createElement("div");return o.className=(t.addClass?t.addClass+" ":"")+"ol-unselectable webmap-ctrl-group",o.appendChild(e),o}function et(t,e="EPSG:3857",o="EPSG:4326"){const[s,r]=i(t.coordinate,e,o);return{latLng:{lat:r,lng:s},lngLat:[s,r],pixel:{left:t.pixel[0],top:t.pixel[1]},source:t}}function ot(t){const e=function({feature:t,dataProjection:e,featureProjection:o}){const i=(new d).readFeatures({type:"FeatureCollection",features:Array.isArray(t)?t:[t]},{dataProjection:e,featureProjection:o}),s=new y;return s.addFeatures(i),s}(t),o=e.getExtent(),i=s(o,t.featureProjection,t.dataProjection);return e.dispose(),i}function it(t){return{getBounds:()=>ot(t),getCenter:()=>function(t){const e=ot(t);return g(e)}(t)}}const st=90.71446714322,rt=39.37;function nt(t,e){const o={minZoom:e.minZoom,maxZoom:e.maxZoom};return e.maxScale&&(o.minResolution=at(t,e.maxScale)),e.minScale&&(o.maxResolution=at(t,e.minScale)),o}function at(t,e){if(e)return function(t,e){return t/(e*rt*st)}(e,t.getView().getProjection().getMetersPerUnit()||1)}function lt(t){return(new d).writeFeatureObject(t,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"})}function ct(t){const e=decodeURIComponent,o=t.split("&"),i={};let s,r;for(let n,a=0,l=o.length;a<l;++a)if(n=o[a],n.length){const t=n.indexOf("=");t<0?(s=e(n),r=""):(s=e(n.slice(0,t)),r=e(n.slice(t+1))),"string"==typeof i[s]&&(i[s]=[i[s]]),Array.isArray(i[s])?i[s].push(r):i[s]=r}return i}function pt(t,e){const o=[];let i;for(i in t){const s=e?e+"["+i+"]":i,r=t[i];o.push(null!==r&&"object"==typeof r?pt(r,s):encodeURIComponent(s)+"="+encodeURIComponent(r))}return o.join("&")}var ht=Object.defineProperty,ut=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,gt=(t,e,o)=>e in t?ht(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,bt=(t,e)=>{for(var o in e||(e={}))ft.call(e,o)&&gt(t,o,e[o]);if(dt)for(var o of dt(e))yt.call(e,o)&&gt(t,o,e[o]);return t};const vt={Point:"point",MultiPoint:"point",LineString:"line",MultiLineString:"line",Polygon:"polygon",MultiPolygon:"polygon",Circle:"point"},_t={polygon:"path",line:"path",point:"circle"};function Pt(t,e){const o=P(t).slice();return o[3]=void 0!==e?e:1,o}function Ot(t,e={}){if(v(e)){return Ot(t,e(lt(t)))}if(_(e)){const o=t.getGeometry(),i=o&&o.getType()||"Point",s={};if(!e.type){const t=vt[i],o="polygon"===t||"line"===t?"path":"html"in e||"className"in e?"icon":_t[t];o&&(e.type=o)}if("path"===e.type||"circle"===e.type){const{radius:t,fill:o,fillColor:r,fillOpacity:n,strokeColor:a,stroke:l,strokeOpacity:c}=bt({},e);o&&r&&"string"==typeof r&&"number"==typeof n&&(s.fill=new O({color:Pt(r,n)})),a&&"string"==typeof a&&"number"==typeof c&&(l||-1!==["MultiLineString","LineString"].indexOf(i))&&(s.stroke=new w({width:e.weight,color:Pt(a,c)})),"circle"===e.type&&"number"==typeof t&&(s.image=new x(bt({radius:t},s)))}else if("icon"===e.type){const t=e.html;if(t){const o={src:"data:image/svg+xml,"+encodeURIComponent(t),anchorXUnits:"pixels",anchorYUnits:"pixels",anchor:e.iconAnchor,rotation:e.rotate};s.image=new E(o)}}return new C(s)}}function wt(t,e){let o={font:"12px Calibri,sans-serif",overflow:!0,fill:new O({color:"#000"}),stroke:new w({color:"#fff",width:3})};var i;return"point"===t&&(i=bt({},o),o=ut(i,mt({placement:"point",textBaseline:"bottom",offsetY:20}))),new C({text:new j(o)})}var Ct=Object.defineProperty,jt=(t,e,o)=>(((t,e,o)=>{e in t?Ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o})(t,"symbol"!=typeof e?e+"":e,o),o);class xt{constructor(t,e){this.map=t,this.options=e,jt(this,"layer")}setOpacity(t){this.options.opacity=Number(t),this.layer&&this.layer.setOpacity&&this.layer.setOpacity(this.options.opacity)}}var Et=Object.defineProperty,Lt=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,St=Object.getOwnPropertySymbols,Vt=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,It=(t,e,o)=>e in t?Et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Mt=(t,e)=>{for(var o in e||(e={}))Vt.call(e,o)&&It(t,o,e[o]);if(St)for(var o of St(e))At.call(e,o)&&It(t,o,e[o]);return t},kt=(t,e,o)=>(It(t,"symbol"!=typeof e?e+"":e,o),o);function Zt(t,e,o){let i=()=>{};const s=t.getImage();return[new Promise(((t,r)=>{const n=new XMLHttpRequest;n.open("GET",e),n.responseType="arraybuffer";for(const e in o)n.setRequestHeader(e,o[e]);n.onload=function(){const e=new Uint8Array(this.response),o=new Blob([e],{type:"image/png"}),i=(window.URL||window.webkitURL).createObjectURL(o);s.src=i,t()},n.onerror=()=>{r()},n.send(),i=()=>{n.abort(),t()}})),i]}var Tt=Object.defineProperty,Dt=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Ht=(t,e,o)=>e in t?Tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Ut=(t,e)=>{for(var o in e||(e={}))Rt.call(e,o)&&Ht(t,o,e[o]);if(Dt)for(var o of Dt(e))Bt.call(e,o)&&Ht(t,o,e[o]);return t},Gt=(t,e,o)=>(Ht(t,"symbol"!=typeof e?e+"":e,o),o);class zt extends F{constructor(t,e){super(t),this.ratio=e}createRenderer(){return new Wt(this,this.ratio)}}class Nt extends V{constructor(t,e){super(t),this.ratio=e}getImageInternal(t,e,o,i){return super.getImageInternal(t,e,this.ratio,i)}}class Wt extends S{constructor(t,e){super(t),this.ratio=e}renderFrame(t,e){return t.pixelRatio=this.ratio,super.renderFrame(t,e)}}const qt=class t extends xt{constructor(t,e){super(t,e),this.map=t,this.options=e,Gt(this,"layer")}addLayer(t){if(Object.assign(this.options,t),t.url){const e=void 0!==t.ratio?t.ratio:1,o={url:t.url,params:Ut({},t.params),projection:void 0,imageLoadFunction:this.constructImageLoadFunction(t)},i=Ut(Ut({opacity:t.opacity},nt(this.map,t)),t.nativeOptions);if(e>1){o.ratio=e,o.serverType="mapserver";const t=new Nt(o,e),s=new zt(Ut({source:t},i),e);this.layer=s}else{const t=new V(o),e=new F(Ut({source:t},i));this.layer=e}return this.layer}}constructImageLoadFunction(e){const o=e.updateWmsParams;return(i,s)=>{const r=s.split("?")[0],n=ct(s.split("?")[1]),{resource:a,BBOX:l,WIDTH:c,HEIGHT:p}=n,h=((t,e)=>{var o={};for(var i in t)Rt.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&Dt)for(var i of Dt(t))e.indexOf(i)<0&&Bt.call(t,i)&&(o[i]=t[i]);return o})(n,["resource","BBOX","WIDTH","HEIGHT"]),u=Ut({resource:a,bbox:l,width:c,height:p},h),m=pt(o?o(u):h),d=e.headers,f=r+"?"+m;t.queue.add((()=>Zt(i,f,d)))}}};Gt(qt,"queue",new L({concurrency:6,delay:200}));let Xt=qt;var Yt=Object.defineProperty,Jt=Object.getOwnPropertySymbols,Kt=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,$t=(t,e,o)=>e in t?Yt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var te=Object.defineProperty,ee=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,se=(t,e,o)=>e in t?te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,re=(t,e)=>{for(var o in e||(e={}))oe.call(e,o)&&se(t,o,e[o]);if(ee)for(var o of ee(e))ie.call(e,o)&&se(t,o,e[o]);return t};var ne=Object.defineProperty,ae=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,pe=(t,e,o)=>e in t?ne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,he=(t,e)=>{for(var o in e||(e={}))le.call(e,o)&&pe(t,o,e[o]);if(ae)for(var o of ae(e))ce.call(e,o)&&pe(t,o,e[o]);return t};var ue=Object.defineProperty,me=Object.defineProperties,de=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,be=(t,e,o)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,ve=(t,e)=>{for(var o in e||(e={}))ye.call(e,o)&&be(t,o,e[o]);if(fe)for(var o of fe(e))ge.call(e,o)&&be(t,o,e[o]);return t},_e=(t,e,o)=>(be(t,"symbol"!=typeof e?e+"":e,o),o);const Pe=class n{constructor(){_e(this,"options",{target:"map"}),_e(this,"layerAdapters",n.layerAdapters),_e(this,"controlAdapters",n.controlAdapters),_e(this,"emitter",new t),_e(this,"map"),_e(this,"displayProjection","EPSG:3857"),_e(this,"lonlatProjection","EPSG:4326"),_e(this,"_mapClickEvents",[]),_e(this,"_forEachFeatureAtPixel",[]),_e(this,"_unselectCb",[]),_e(this,"_olView"),_e(this,"_panelControl"),_e(this,"_isLoaded",!1),_e(this,"_positionMem",{})}create(t){this.options=ve({},t);const i=this.getViewOptions(this.options),s={controls:[],view:new o(i),layers:[]};t.mapAdapterOptions&&Object.assign(s,t.mapAdapterOptions);const r=(n=ve({},s),me(n,de({target:this.options.target||"map"})));var n;this.map=this.options.map||new e(r),this._panelControl=new $,this.map.addControl(this._panelControl),this.map.set("_mapClickEvents",this._mapClickEvents),this.map.set("_forEachFeatureAtPixel",this._forEachFeatureAtPixel),this.map.set("_addUnselectCb",(t=>this._addUnselectCb(t))),this.emitter.emit("create",this),this._olView=this.map.getView(),this._isLoaded=!0,this._addMapListeners(),this._addViewListeners()}destroy(){this.map&&this.map.dispose()}getContainer(){if(this.options.target){let t;return"string"==typeof this.options.target?t=document.getElementById(this.options.target):this.options.target instanceof HTMLElement&&(t=this.options.target),t}}getControlContainer(){if(this._panelControl)return this._panelControl.getContainer();throw new Error("The ol-map-adapter ControlPanel has not been initialized yet")}setCenter(t){this._olView&&this._olView.setCenter(r(t))}getCenter(){if(this._olView){const t=this._olView.getCenter();if(t){return i(t,this.displayProjection,this.lonlatProjection)}}}setZoom(t){this._olView&&this._olView.setZoom(t)}getZoom(){if(this._olView)return this._olView.getZoom()}fitBounds(t,e={}){if(this._olView){const{padding:o,maxZoom:i,offset:r}=e,n=this.getZoom(),a=s(t,this.lonlatProjection,this.displayProjection),l={};i&&(l.maxZoom=i),o&&(l.padding=[o,o]),r&&(l.padding=r),this._olView.fit(a,l),this._emitMoveEndEvents({zoom:n})}}getBounds(){if(!this._olView)return;const t=this._olView.calculateExtent();return s(t,this.displayProjection,this.lonlatProjection)}setRotation(t){this._olView&&this._olView.setRotation(t)}setView(t,e){if(this.map)if(Array.isArray(t)){this._setView({zoom:e,center:r(t)})}else{const{bounds:e}=t,o=this.getViewOptions(t);Object.values(o).some(Boolean)&&this._setView(o),e&&this.fitBounds(e)}}removeLayer(t){this.map&&this.map.removeLayer(t)}showLayer(t){if(this.map){const e=this.map.getLayers();for(const o of e.getArray())if(o===t)return void("production"!==process.env.NODE_ENV&&console.warn("DEV: OL layer already added"));this.map.addLayer(t)}}hideLayer(t){this.map&&this.map.removeLayer(t)}setLayerOpacity(t,e){t.setOpacity&&t.setOpacity(Number(e))}setLayerOrder(t,e){t&&t.setZIndex&&t.setZIndex(e)}createControl(t,e){return function(t,e={},o){return new class extends l{constructor(){const i=document.createElement("div");i.className=(e.addClass?e.addClass+" ":"")+"ol-unselectable"+(e.bar?" webmap-ctrl-group":"")+(e.margin?" ol-control-margin":"");const s=t.onAdd(o);s&&i.appendChild(s),super({element:i})}}}(t,e,this)}createButtonControl(t){return function(t){return new class extends l{constructor(){super({element:tt(t)}),t.onClick&&this.element.querySelector("button").addEventListener("click",t.onClick,!1)}handleRotateNorth(){var t;null==(t=this.getMap())||t.getView().setRotation(0)}}}(t)}addControl(t,e){if(this._panelControl)return this._panelControl.addControl(t,e),t}removeControl(t){this._panelControl&&this._panelControl.removeControl(t)}onMapClick(t){const e=et(t);this.emitter.emit("preclick",e);this._callEachFeatureAtPixel(t,"click")||this._mapClickEvents.forEach((e=>{e(t)})),this.emitter.emit("click",e)}getViewOptions(t){const{zoom:e,center:o,maxBounds:i,minZoom:n,maxZoom:a}=t,l={zoom:e,minZoom:n,maxZoom:a,projection:this.displayProjection};if(o&&(l.center=r(o)),i){const t=s(i,this.lonlatProjection,this.displayProjection);l.extent=t}return l}_callEachFeatureAtPixel(t,e){if(t&&t.pixel&&this._forEachFeatureAtPixel.length&&this.map){const o=this._forEachFeatureAtPixel.sort(((t,e)=>e[0]-t[0]));for(const i of o){if(i[1](t.pixel,t,e))return!0}}return!1}_emitMoveEndEvents(t){if(this._isLoaded){const e=this.getZoom();t.zoom!==e&&this.emitter.emit("zoomend")}}_addMapListeners(){const t=this.map;if(t){const e=t.getViewport();t.on("click",(t=>{this.onMapClick(t)})),t.on("pointermove",(t=>{this.emitter.emit("mousemove",et(t)),this._callEachFeatureAtPixel(t,"hover")}));const o=e=>{const o=[e.x,e.y],i=t.getCoordinateFromPixel(o);if(i){return et(ve({pixel:o,coordinate:i},e))}};e.addEventListener("mouseout",(t=>{this.emitter.emit("mouseout",o(t))}),!1),e.addEventListener("mouseover",(t=>{this.emitter.emit("mouseover",o(t))}),!1);const i=this.getCenter(),s=this.getZoom(),r=["movestart","moveend"];for(const n of r)this._positionMem[n]={center:i,zoom:s},t.on(n,(()=>{this._emitPositionChangeEvent(n)}));t.once("movestart",(()=>{t.on("movestart",(()=>{Xt.queue.abort()}))}))}}_addViewListeners(){this._olView&&(this._olView.on("change:resolution",(()=>{this.emitter.emit("zoom",this)})),this._olView.on("change:center",(()=>{this.emitter.emit("move",this)})))}_setView(t){const{center:e,zoom:i,extent:s,minZoom:r,maxZoom:n}=t,a=this.map;if(!a)return;const l=a.getView();if(void 0!==s){l.dispose();const e=new o(t);this._olView=e,this._addViewListeners(),a.setView(e)}else e&&l.setCenter(e),void 0!==i&&l.setZoom(i),void 0!==r&&l.setMinZoom(r),void 0!==n&&l.setMaxZoom(n)}_addUnselectCb(t){for(const e of this._unselectCb)e();this._unselectCb.length=0,this._unselectCb.push(t)}_emitPositionChangeEvent(t){const e=this._positionMem[t];let o,i;e&&(o=e.center,i=e.zoom);const s=this.getCenter(),r=this.getZoom();if(i!==r){this.emitter.emit("movestart"===t?"zoomstart":"zoomend",this)}if(o&&s){const[e,i]=s,[r,n]=o;e===r&&i===n||this.emitter.emit(t,this)}else o!==s&&this.emitter.emit(t,this);this._positionMem[t]={center:s,zoom:r}}};_e(Pe,"layerAdapters",{IMAGE:Xt,TILE:class extends xt{constructor(t,e){super(t,e),this.map=t,this.options=e}addLayer(t){Object.assign(this.options,t);const e=function(t,e){const o=[],i="string"==typeof e?e.split(""):e;return(null==i?void 0:i.length)?i.forEach((e=>{o.push(t.replace(/{s}/,e))})):o.push(t),o}(t.url,t.subdomains),o={attributions:t.attribution?[t.attribution]:[],urls:e};t.crossOrigin&&(o.crossOrigin=t.crossOrigin);const i=new k(o),s=t.headers;s&&i.setTileLoadFunction(((t,e)=>{Zt(t,e,s)}));return new A(re(re({source:i,opacity:t.opacity},nt(this.map,t)),t.nativeOptions))}},WMS:class extends xt{constructor(t,e){var o,i;super(t,e),this.map=t,this.options=e,pe(this,"symbol"!=typeof(o="layer")?o+"":o,i)}addLayer(t){Object.assign(this.options,t);const e={url:t.url,params:{LAYERS:t.layers,VERSION:t.version},projection:void 0},o=t.updateWmsParams;o&&(e.tileLoadFunction=(e,i)=>{const s=i.split("?")[0],r=i.split("?")[1],{resource:n,BBOX:a,WIDTH:l,HEIGHT:c}=ct(r),p=pt(o({resource:n,bbox:a,width:l,height:c})),h=t.headers,u=s+"?"+p;h?Zt(e,u,h):e.getImage().src=u});const i=new Z(e),s=new A(he(he({source:i,opacity:t.opacity},nt(this.map,t)),t.nativeOptions));return this.layer=s,s}},OSM:class extends xt{constructor(t,e){var o;super(t,e),this.map=t,this.options=e,$t(this,"symbol"!=typeof(o="name")?o+"":o,"OpenStreetMap")}addLayer(t){Object.assign(this.options,t),this.options.name=this.name;return new A(((t,e)=>{for(var o in e||(e={}))Kt.call(e,o)&&$t(t,o,e[o]);if(Jt)for(var o of Jt(e))Qt.call(e,o)&&$t(t,o,e[o]);return t})({source:new I({attributions:[M]})},t.nativeOptions))}},GEOJSON:class extends xt{constructor(t,e){var o;super(t,e),this.map=t,this.options=e,kt(this,"layer"),kt(this,"paint"),kt(this,"selectedPaint"),kt(this,"selected",!1),kt(this,"displayProjection","EPSG:3857"),kt(this,"lonlatProjection","EPSG:4326"),kt(this,"vectorSource",new y),kt(this,"_features",[]),kt(this,"_selectedFeatures",[]),kt(this,"_filterFun"),kt(this,"_mouseOver"),kt(this,"_openedPopup",[]),kt(this,"_forEachFeatureAtPixel",[]),kt(this,"_mapClickEvents",[]),kt(this,"_styleCache",{}),kt(this,"_labelVisibility",!0),this._labelVisibility=null!=(o=e.labelVisibility)?o:this._labelVisibility,this.displayProjection=t.getView().getProjection().getCode()}get addUnselectCb(){return this.map.get("_addUnselectCb")}get mapClickEvents(){return this.map.get("_mapClickEvents")}get forEachFeatureAtPixel(){return this.map.get("_forEachFeatureAtPixel")}addLayer(t){var e;Object.assign(this.options,t),this.paint=t.paint,this.selectedPaint=t.selectedPaint;const o=t.data;o&&this.addData(o),this.layer=new f(Mt(Mt({source:this.vectorSource,style:e=>this._getFeatureStyle(e,t.paint||{},t.type)},nt(this.map,t)),t.nativeOptions));return(null==(e=t.interactive)||e)&&this._addEventListener(),this.layer}beforeRemove(){const t=this.forEachFeatureAtPixel;for(let o=t.length;o--;){const e=t[o][1];-1!==t.findIndex((t=>t[1]===e))&&t.splice(o,1)}this._forEachFeatureAtPixel.length=0;const e=this.mapClickEvents;for(let o=e.length;o--;){-1!==e.indexOf(e[o])&&e.splice(o,1)}this._mapClickEvents.length=0,this._removeAllPopup()}clearLayer(t){if(this.unselect(),t){const e=this.vectorSource.getFeatures().values();let o;for(;!(o=e.next()).done;){t(lt(o.value))&&this.vectorSource.removeFeature(o.value)}}else this.vectorSource.clear()}setData(t){this.clearLayer(),this.addData(t)}addData(t){const e=this.options.srs,o="EPSG:"+(null!=e?e:"4326"),i=(new d).readFeatures(t,{dataProjection:o,featureProjection:this.displayProjection});if(this._features=this._features.concat(i),this._filterFun)this.filter(this._filterFun);else if(this.vectorSource.addFeatures(i),this.options.popup)for(const s of this._features)this._openPopup({feature:s,type:"api",options:this.options.popupOptions})}select(t){if(this.unselect(),"function"==typeof t){const e=this._features.filter((e=>t(this._createLayerDefOpts(lt(e)))));for(const t of e)this._selectFeature(t)}else this.selected||(this.selected=!0,this.selectedPaint&&this._setPaintEachLayer(this.selectedPaint))}unselect(t){let e=this._selectedFeatures;"function"==typeof t?e=this._selectedFeatures.filter((e=>t(this._createLayerDefOpts(lt(e))))):this.selected&&(this.selected=!1);for(const o of e)this._unselectFeature(o);this._removeAllPopup()}getLayers(){return this._features.map((t=>this._createLayerDefOpts(lt(t))))}getSelected(){return this._selectedFeatures.map((t=>this._createLayerDefOpts(lt(t))))}filter(t){this._filterFun=t;const e=this._features,o=t?e.filter((e=>t(this._createLayerDefOpts(lt(e))))):e;this.vectorSource.clear();const i=o.length;for(let s=0;s<i;s++)this.vectorSource.addFeature(o[s]);return o.map((t=>this._createLayerDefOpts(lt(t))))}cleanFilter(){this.filter()}getExtent(){return this.getBounds()}getBounds(){if(this.layer){const t=this.layer.getSource();if(t){const e=t.getExtent();return s(e,this.displayProjection,this.lonlatProjection)}}}setPaint(t){t&&(this.paint=t,this._setPaintEachLayer(this.paint))}setSelectedPaint(t){t&&(this.selectedPaint=t,this._setPaintEachLayer(this.selectedPaint))}updatePaint(t){this.paint=Mt(Mt({},this.paint),t),this._setPaintEachLayer(this.paint)}updateSelectedPaint(t){this.selectedPaint=Mt(Mt({},this.selectedPaint),t),this._setPaintEachLayer(this.selectedPaint)}isLabelVisible(){return this._labelVisibility}hideLabel(){this._toggleLabel(!1)}showLabel(){this._toggleLabel(!0)}_toggleLabel(t){this._labelVisibility=t,this.updatePaint({})}_createLayerDefOpts(t){return Mt({target:this,feature:t},it({feature:t,dataProjection:this.lonlatProjection,featureProjection:this.displayProjection}))}_getFeatureStyle(t,e,o="polygon"){var i;const s=[],r=t.getId(),n=void 0!==r&&this._styleCache[r];if(n)return n;const a=Ot(t,e);if(a&&s.push(a),this._labelVisibility){const{labelField:e,label:r}=this.options;let n="";if("string"==typeof e?n=t.get(e):r&&(n=r(this._createLayerDefOpts(lt(t)))),n=String(n),n){const t=u(n)?n:"";if(t){const e=wt(o);null==(i=e.getText())||i.setText(t),s.push(e)}}}return void 0!==r&&(this._styleCache[r]=s),s}_setPaintEachLayer(t){if(this._styleCache={},this.layer){const e=this.layer.getSource();if(e){const o=e.getFeatures();for(const e of o){const o=this._getFeatureStyle(e,t,this.options.type);o&&e.setStyle(o)}}}}_addEventListener(){var t;const e=this.forEachFeatureAtPixel,o=[this.options.order||0,(t,e,o)=>this._onFeatureAtPixel(t,e,o)];this._forEachFeatureAtPixel.push(o),e.push(o);(null==(t=this.options.unselectOnClick)||t)&&(this._mapClickEvents.push((()=>this.unselect())),this.mapClickEvents.push((()=>this.unselect())))}_onFeatureAtPixel(t,e,o){const i=t&&this.map.getFeaturesAtPixel(t,{layerFilter:t=>t===this.layer})[0],s=(t=>({layer:this,event:et(t),source:t}))(e);if(i){const t=Mt(Mt({},s),this._createLayerDefOpts(lt(i)));let e=-1!==this._selectedFeatures.indexOf(i);return this.options.selectable&&("hover"===o&&this.options.selectOnHover||"click"===o)&&(e?this.options&&this.options.unselectOnSecondClick&&(this._unselectFeature(i),e=!1):(this._selectFeature(i,t.event.lngLat),e=!0)),"click"===o&&this.options.onClick&&this.options.onClick(Mt({selected:e},t)),"hover"===o&&(this._mouseOver=!0,this.options.onMouseOver&&this.options.onMouseOver(t)),!0}return"hover"===o&&this._mouseOver&&(this._mouseOver=!1,this.options.onMouseOut&&this.options.onMouseOut(s),this.options.selectOnHover&&this.unselect()),!1}_selectFeature(t,e){const{multiselect:o,selectedPaint:i,popupOptions:s,popupOnSelect:r,onSelect:n}=this.options||{},a=e?"click":"api";if(!o){this.addUnselectCb((()=>this._unselectFeature(t)));for(const t of this._selectedFeatures)this._unselectFeature(t)}if(this._selectedFeatures.push(t),this.selected=!0,i){const e=Ot(t,i);e&&t.setStyle(e)}if(r&&this._openPopup({coordinates:e,feature:t,options:s,type:"click"}),n){const e=lt(t);n(Mt({layer:this,features:[],type:a},it({feature:e,dataProjection:this.lonlatProjection,featureProjection:this.displayProjection})))}}_unselectFeature(t){const e=this._selectedFeatures.indexOf(t);if(-1!==e){this._selectedFeatures.splice(e,1);const o=this._openedPopup.find((e=>e[0]===t));o&&this._removePopup(o[1])}if(this.selected=this._selectedFeatures.length>0,this.options&&this.options.paint){const e=Ot(t,this.options.paint);e&&t.setStyle(e)}}_openPopup(t){return e=this,o=arguments,s=function*({coordinates:t,feature:e,options:o={},type:s}){const r=this.map;if(!r)return;let n;const a=[],l=()=>{n&&this._removePopup(n)},{createPopupContent:c,popupContent:p}=o,u=lt(e),d=c?yield c(Mt({close:l,onClose:t=>{a.push(t)},type:s},this._createLayerDefOpts(u))):p;if(t=t||u&&function(t){return"Polygon"===t.geometry.type?b(t.geometry.coordinates):"Point"===t.geometry.type?t.geometry.coordinates:(e=h(t)).reduce(((t,o)=>[t[0]+o[0]/e.length,t[1]+o[1]/e.length]),[0,0]);var e}(u),d&&t){const s="string"==typeof d?function(t){const e=document.createElement("div");return e.innerHTML=t,e}(d):d,c=this._createPopupElement((f=Mt({},o),Lt(f,Ft({popupContent:s,close:l}))));n=new m({element:c}),n.setPosition(i(t,this.lonlatProjection,this.displayProjection)),r.addOverlay(n),this._openedPopup.push([e,n,a])}var f},new Promise(((t,i)=>{var r=t=>{try{a(s.next(t))}catch(e){i(e)}},n=t=>{try{a(s.throw(t))}catch(e){i(e)}},a=e=>e.done?t(e.value):Promise.resolve(e.value).then(r,n);a((s=s.apply(e,o)).next())}));var e,o,s}_createPopupElement({closeButton:t,popupContent:e,maxWidth:o,minWidth:i,close:s}){t=null!=t?t:!this.options.selectOnHover;const r=p("div","ol-popup");if(o&&(r.style.maxWidth=o+"px"),i&&(r.style.minWidth=i+"px"),t){const t=p("a","ol-popup-closer",r);t.setAttribute("href","#"),t.addEventListener("click",s)}return p("div","popup-content",r).appendChild(e),r}_removeAllPopup(){const t=[...this._openedPopup];this._openedPopup=[];for(const e of t)this._removePopup(e[1])}_removePopup(t){var e,o;const i=this.map;if(i){i.removeOverlay(t);const s=this._openedPopup.findIndex((e=>e[1]===t));if(-1!==s){const[t,,i]=this._openedPopup[s],r=null==(o=null==(e=this.options.popupOptions)?void 0:e.unselectOnClose)||o;for(const e of i)e(this._createLayerDefOpts(lt(t)));i.length=0,r&&this._unselectFeature(t),this._openedPopup.splice(s,1)}}}}}),_e(Pe,"controlAdapters",{ZOOM:class extends c{constructor(...t){super(...t),this.element.classList.remove("ol-control"),this.element.classList.add("webmap-ctrl-group")}},ATTRIBUTION:class extends n{constructor(t){super(U(U({},G),t))}}});let Oe=Pe;export{Oe as default};
//# sourceMappingURL=ol-map-adapter.esm-bundler.prod.js.map
{
"name": "@nextgis/ol-map-adapter",
"version": "2.2.0",
"version": "2.2.1",
"_priority": 16,

@@ -16,2 +16,3 @@ "description": "",

"@nextgis/properties-filter": "^2.1.0",
"@nextgis/queue": "^2.2.1",
"@nextgis/webmap": "^2.1.0",

@@ -64,3 +65,3 @@ "@types/events": "^3.0.0",

},
"gitHead": "5289fb2de1502afa471af7862d152ac20ceb866b"
"gitHead": "0a7dabcbf2b7a5d9dbbcca81ce7b4b94f910deb4"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc