Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* import NgwMap from '@nextgis/ngw-map';
* import MapAdapter from '@nextgis/leaflet-map-adapter';
* // styles are not included in the leaflet-map-adapter
* import 'leaflet/dist/leaflet.css';
*
* const ngwMap = new NgwMap(new MapAdapter(), {
* target: 'map',
* qmsId: 487,
* baseUrl: 'https://demo.nextgis.com',
* webmapId: 3985
* });
* ```
*/
export class NgwMap extends WebMap {
static utils = {
...WebMap.utils,
...NgwKit.utils,
fixUrlStr,
deepmerge
};
static decorators = { onMapLoad, ...WebMap.decorators };
static getIcon = getIcon;
readonly emitter: StrictEventEmitter = new EventEmitter();
options: NgwMapOptions & O = {} as NgwMapOptions & O;
connector!: NgwConnector;
protected _ngwLayers: NgwLayers = {};
private __selectFromNgwRaster?: (ev: MapClickEvent) => void;
private __selectFromNgwVector?: (ev: OnLayerClickOptions) => void;
this.filter(e => {
if (e.feature && e.feature.properties) {
return WebMap.utils.propertiesFilter(e.feature.properties, filters);
}
return true;
});
} else if (this.setData) {