UNPKG

ng-azure-maps

Version:
1,118 lines (1,098 loc) 144 kB
import * as i0 from '@angular/core'; import { InjectionToken, Input, Directive, Output, ContentChildren, ContentChild, Inject, Injectable, APP_INITIALIZER, NgModule } from '@angular/core'; import { Subject } from 'rxjs'; import * as atlas from 'azure-maps-control'; import { AuthenticationType } from 'azure-maps-control'; import * as atlasdrawing from 'azure-maps-drawing-tools'; import * as i1 from '@angular/common/http'; import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; import * as atlas$1 from 'azure-maps-rest'; const AZUREMAPS_CONFIG = new InjectionToken('AZUREMAPS_CONFIG'); /** * Configuration of the Azure Maps */ class AzureMapsConfiguration { } class ControlDirective { static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: ControlDirective, isStandalone: true, inputs: { position: "position" }, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ControlDirective, decorators: [{ type: Directive }], propDecorators: { position: [{ type: Input }] } }); class ZoomControlDirective extends ControlDirective { initialize(map) { map.controls.add(new atlas.control.ZoomControl({ zoomDelta: this.zoomDelta, style: this.controlStyle }), { position: this.position }); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ZoomControlDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: ZoomControlDirective, isStandalone: false, selector: "[map-zoom-control], map-zoom-control", inputs: { zoomDelta: "zoomDelta", controlStyle: "controlStyle" }, usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ZoomControlDirective, decorators: [{ type: Directive, args: [{ selector: '[map-zoom-control], map-zoom-control', standalone: false }] }], propDecorators: { zoomDelta: [{ type: Input }], controlStyle: [{ type: Input }] } }); class PitchControlDirective extends ControlDirective { initialize(map) { map.controls.add(new atlas.control.PitchControl({ pitchDegreesDelta: this.pitchDegreesDelta, style: this.controlStyle }), { position: this.position }); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: PitchControlDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: PitchControlDirective, isStandalone: false, selector: "[map-pitch-control], map-pitch-control", inputs: { pitchDegreesDelta: "pitchDegreesDelta", controlStyle: "controlStyle" }, usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: PitchControlDirective, decorators: [{ type: Directive, args: [{ selector: '[map-pitch-control], map-pitch-control', standalone: false }] }], propDecorators: { pitchDegreesDelta: [{ type: Input }], controlStyle: [{ type: Input }] } }); class CompassControlDirective extends ControlDirective { initialize(map) { map.controls.add(new atlas.control.CompassControl({ rotationDegreesDelta: this.rotationDegreesDelta, style: this.controlStyle }), { position: this.position }); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CompassControlDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: CompassControlDirective, isStandalone: false, selector: "[map-compass-control], map-compass-control", inputs: { rotationDegreesDelta: "rotationDegreesDelta", controlStyle: "controlStyle" }, usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: CompassControlDirective, decorators: [{ type: Directive, args: [{ selector: '[map-compass-control], map-compass-control', standalone: false }] }], propDecorators: { rotationDegreesDelta: [{ type: Input }], controlStyle: [{ type: Input }] } }); class StyleControlDirective extends ControlDirective { initialize(map) { map.controls.add(new atlas.control.StyleControl({ layout: this.layout, mapStyles: this.mapStyles, style: this.controlStyle }), { position: this.position }); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: StyleControlDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: StyleControlDirective, isStandalone: false, selector: "[map-style-control], map-style-control", inputs: { layout: "layout", mapStyles: "mapStyles", controlStyle: "controlStyle" }, usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: StyleControlDirective, decorators: [{ type: Directive, args: [{ selector: '[map-style-control], map-style-control', standalone: false }] }], propDecorators: { layout: [{ type: Input }], mapStyles: [{ type: Input }], controlStyle: [{ type: Input }] } }); class HtmlMarkerDirective { constructor() { this._markerEvents = new Map([ ['click', e => this.onClick.next(this.toMarkerEvent(e))], ['contextmenu', e => this.onContextMenu.next(this.toMarkerEvent(e))], ['dblclick', e => this.onDblClick.next(this.toMarkerEvent(e))], ['drag', e => this.onDrag.next(this.toMarkerEvent(e))], ['dragstart', e => this.onDragStart.next(this.toMarkerEvent(e))], ['dragend', e => this.onDragEnd.next(this.toMarkerEvent(e))], ['keydown', e => this.onKeyDown.next(this.toMarkerEvent(e))], ['keypress', e => this.onKeyPress.next(this.toMarkerEvent(e))], ['keyup', e => this.onKeyUp.next(this.toMarkerEvent(e))], ['mousedown', e => this.onMouseDown.next(this.toMarkerEvent(e))], ['mouseenter', e => this.onMouseEnter.next(this.toMarkerEvent(e))], ['mouseleave', e => this.onMouseLeave.next(this.toMarkerEvent(e))], ['mousemove', e => this.onMouseMove.next(this.toMarkerEvent(e))], ['mouseout', e => this.onMouseOut.next(this.toMarkerEvent(e))], ['mouseover', e => this.onMouseOver.next(this.toMarkerEvent(e))], ['mouseup', e => this.onMouseUp.next(this.toMarkerEvent(e))] ]); this.onClick = new Subject(); this.onContextMenu = new Subject(); this.onDblClick = new Subject(); this.onDrag = new Subject(); this.onDragStart = new Subject(); this.onDragEnd = new Subject(); this.onKeyDown = new Subject(); this.onKeyPress = new Subject(); this.onKeyUp = new Subject(); this.onMouseDown = new Subject(); this.onMouseEnter = new Subject(); this.onMouseLeave = new Subject(); this.onMouseMove = new Subject(); this.onMouseOut = new Subject(); this.onMouseOver = new Subject(); this.onMouseUp = new Subject(); } get hasMap() { return !!this._map; } ngOnChanges() { if (this._marker) { this._marker.setOptions({ anchor: this.anchor, color: this.color, draggable: this.draggable, htmlContent: this.htmlContent, pixelOffset: this.pixelOffset, position: this.position, secondaryColor: this.secondaryColor, text: this.text, visible: this.visible }); } } ngOnDestroy() { if (this._map && this._marker) { this._map.markers.remove(this._marker); } } addToMap(map) { this._map = map; this._marker = this.marker ? this.marker : new atlas.HtmlMarker({ anchor: this.anchor, color: this.color, draggable: this.draggable, htmlContent: this.htmlContent, pixelOffset: this.pixelOffset, position: this.position, secondaryColor: this.secondaryColor, text: this.text, visible: this.visible }); this._markerEvents.forEach((value, key) => { this._map.events.add(key, this._marker, value); }); map.markers.add(this._marker); } toMarkerEvent(e) { return { marker: this._marker, event: e }; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HtmlMarkerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: HtmlMarkerDirective, isStandalone: false, selector: "[map-html-marker], map-html-marker", inputs: { anchor: "anchor", color: "color", draggable: "draggable", htmlContent: "htmlContent", pixelOffset: "pixelOffset", position: "position", secondaryColor: "secondaryColor", text: "text", visible: "visible", marker: "marker" }, outputs: { onClick: "onClick", onContextMenu: "onContextMenu", onDblClick: "onDblClick", onDrag: "onDrag", onDragStart: "onDragStart", onDragEnd: "onDragEnd", onKeyDown: "onKeyDown", onKeyPress: "onKeyPress", onKeyUp: "onKeyUp", onMouseDown: "onMouseDown", onMouseEnter: "onMouseEnter", onMouseLeave: "onMouseLeave", onMouseMove: "onMouseMove", onMouseOut: "onMouseOut", onMouseOver: "onMouseOver", onMouseUp: "onMouseUp" }, usesOnChanges: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HtmlMarkerDirective, decorators: [{ type: Directive, args: [{ selector: '[map-html-marker], map-html-marker', standalone: false }] }], propDecorators: { anchor: [{ type: Input }], color: [{ type: Input }], draggable: [{ type: Input }], htmlContent: [{ type: Input }], pixelOffset: [{ type: Input }], position: [{ type: Input }], secondaryColor: [{ type: Input }], text: [{ type: Input }], visible: [{ type: Input }], marker: [{ type: Input }], onClick: [{ type: Output }], onContextMenu: [{ type: Output }], onDblClick: [{ type: Output }], onDrag: [{ type: Output }], onDragStart: [{ type: Output }], onDragEnd: [{ type: Output }], onKeyDown: [{ type: Output }], onKeyPress: [{ type: Output }], onKeyUp: [{ type: Output }], onMouseDown: [{ type: Output }], onMouseEnter: [{ type: Output }], onMouseLeave: [{ type: Output }], onMouseMove: [{ type: Output }], onMouseOut: [{ type: Output }], onMouseOver: [{ type: Output }], onMouseUp: [{ type: Output }] } }); class DrawingToolbarDirective { constructor() { this.drawingChanged = new Subject(); this.drawingChanging = new Subject(); this.drawingComplete = new Subject(); this.drawingModeChanged = new Subject(); this.drawingStarted = new Subject(); } ngOnChanges() { if (this._toolbar) { this._toolbar.setOptions({ buttons: this.buttons, containerId: this.containerId, numColumns: this.numColumns, position: this.position, style: this.toolbarStyle, visible: this.visible }); } } ngOnDestroy() { if (this._map) { this._map.events.remove('drawingchanged', this._drawingManager, null); this._map.events.remove('drawingchanging', this._drawingManager, null); this._map.events.remove('drawingcomplete', this._drawingManager, null); this._map.events.remove('drawingmodechanged', this._drawingManager, null); this._map.events.remove('drawingstarted', this._drawingManager, null); this._map.controls.remove(this._toolbar); } } initialize(map) { this._map = map; this._toolbar = new atlasdrawing.control.DrawingToolbar({ buttons: this.buttons, containerId: this.containerId, numColumns: this.numColumns, position: this.position, style: this.toolbarStyle, visible: this.visible }); this._drawingManager = new atlasdrawing.drawing.DrawingManager(map, { dragHandleStyle: this.dragHandleStyle, freehandInterval: this.freehandInterval, interactionType: this.interactionType, mode: this.mode, secondaryDragHandleStyle: this.secondaryDragHandleStyle, shapeDraggingEnabled: this.shapeDraggingEnabled, toolbar: this._toolbar }); this._map.events.add('drawingchanged', this._drawingManager, e => { this.drawingChanged.next(e); }); this._map.events.add('drawingchanging', this._drawingManager, e => { this.drawingChanging.next(e); }); this._map.events.add('drawingcomplete', this._drawingManager, e => { this.drawingComplete.next(e); }); this._map.events.add('drawingmodechanged', this._drawingManager, e => { this.drawingModeChanged.next(e); }); this._map.events.add('drawingstarted', this._drawingManager, e => { this.drawingStarted.next(e); }); } getDatasource() { return this._drawingManager.getSource(); } getPreviewSource() { return this._drawingManager.drawingHelper.previewSource; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DrawingToolbarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: DrawingToolbarDirective, isStandalone: false, selector: "[map-drawing-toolbar], map-drawing-toolbar", inputs: { dragHandleStyle: "dragHandleStyle", freehandInterval: "freehandInterval", interactionType: "interactionType", mode: "mode", secondaryDragHandleStyle: "secondaryDragHandleStyle", shapeDraggingEnabled: "shapeDraggingEnabled", buttons: "buttons", containerId: "containerId", numColumns: "numColumns", position: "position", toolbarStyle: "toolbarStyle", visible: "visible" }, outputs: { drawingChanged: "drawingChanged", drawingChanging: "drawingChanging", drawingComplete: "drawingComplete", drawingModeChanged: "drawingModeChanged", drawingStarted: "drawingStarted" }, usesOnChanges: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DrawingToolbarDirective, decorators: [{ type: Directive, args: [{ selector: '[map-drawing-toolbar], map-drawing-toolbar', standalone: false }] }], propDecorators: { dragHandleStyle: [{ type: Input }], freehandInterval: [{ type: Input }], interactionType: [{ type: Input }], mode: [{ type: Input }], secondaryDragHandleStyle: [{ type: Input }], shapeDraggingEnabled: [{ type: Input }], buttons: [{ type: Input }], containerId: [{ type: Input }], numColumns: [{ type: Input }], position: [{ type: Input }], toolbarStyle: [{ type: Input }], visible: [{ type: Input }], drawingChanged: [{ type: Output }], drawingChanging: [{ type: Output }], drawingComplete: [{ type: Output }], drawingModeChanged: [{ type: Output }], drawingStarted: [{ type: Output }] } }); class LayerDirective { constructor() { this._layerEvents = new Map([ ['click', e => this.onClick.next(this.toLayerEvent(this.layer, e))], ['contextmenu', e => this.onContextMenu.next(this.toLayerEvent(this.layer, e))], ['dblclick', e => this.onDblClick.next(this.toLayerEvent(this.layer, e))], ['layeradded', e => this.onAdded.next(this.toLayerEvent(this.layer, e))], ['layerremoved', e => this.onRemoved.next(this.toLayerEvent(this.layer, e))], ['mousedown', e => this.onMouseDown.next(this.toLayerEvent(this.layer, e))], ['mouseenter', e => this.onMouseEnter.next(this.toLayerEvent(this.layer, e))], ['mouseleave', e => this.onMouseLeave.next(this.toLayerEvent(this.layer, e))], ['mousemove', e => this.onMouseMove.next(this.toLayerEvent(this.layer, e))], ['mouseout', e => this.onMouseOut.next(this.toLayerEvent(this.layer, e))], ['mouseover', e => this.onMouseOver.next(this.toLayerEvent(this.layer, e))], ['mouseup', e => this.onMouseUp.next(this.toLayerEvent(this.layer, e))], ['touchcancel', e => this.onTouchCancel.next(this.toLayerEvent(this.layer, e))], ['touchend', e => this.onTouchEnd.next(this.toLayerEvent(this.layer, e))], ['touchmove', e => this.onTouchMove.next(this.toLayerEvent(this.layer, e))], ['touchstart', e => this.onTouchStart.next(this.toLayerEvent(this.layer, e))], ['wheel', e => this.onWheel.next(this.toLayerEvent(this.layer, e))], ]); this.onAdded = new Subject(); this.onClick = new Subject(); this.onContextMenu = new Subject(); this.onDblClick = new Subject(); this.onMouseDown = new Subject(); this.onMouseEnter = new Subject(); this.onMouseLeave = new Subject(); this.onMouseMove = new Subject(); this.onMouseOut = new Subject(); this.onMouseOver = new Subject(); this.onMouseUp = new Subject(); this.onRemoved = new Subject(); this.onTouchCancel = new Subject(); this.onTouchEnd = new Subject(); this.onTouchMove = new Subject(); this.onTouchStart = new Subject(); this.onWheel = new Subject(); } get hasLayer() { return !!this.layer; } ngOnDestroy() { this.layer.getMap().layers.remove(this.layer); } initializeEvents(map) { this._layerEvents.forEach((value, key) => { map.events.add(key, this.layer, value); }); } toLayerEvent(layer, e) { return { layer, event: e }; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LayerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: LayerDirective, isStandalone: true, inputs: { id: "id", before: "before" }, outputs: { onAdded: "onAdded", onClick: "onClick", onContextMenu: "onContextMenu", onDblClick: "onDblClick", onMouseDown: "onMouseDown", onMouseEnter: "onMouseEnter", onMouseLeave: "onMouseLeave", onMouseMove: "onMouseMove", onMouseOut: "onMouseOut", onMouseOver: "onMouseOver", onMouseUp: "onMouseUp", onRemoved: "onRemoved", onTouchCancel: "onTouchCancel", onTouchEnd: "onTouchEnd", onTouchMove: "onTouchMove", onTouchStart: "onTouchStart", onWheel: "onWheel" }, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LayerDirective, decorators: [{ type: Directive }], propDecorators: { id: [{ type: Input }], before: [{ type: Input }], onAdded: [{ type: Output }], onClick: [{ type: Output }], onContextMenu: [{ type: Output }], onDblClick: [{ type: Output }], onMouseDown: [{ type: Output }], onMouseEnter: [{ type: Output }], onMouseLeave: [{ type: Output }], onMouseMove: [{ type: Output }], onMouseOut: [{ type: Output }], onMouseOver: [{ type: Output }], onMouseUp: [{ type: Output }], onRemoved: [{ type: Output }], onTouchCancel: [{ type: Output }], onTouchEnd: [{ type: Output }], onTouchMove: [{ type: Output }], onTouchStart: [{ type: Output }], onWheel: [{ type: Output }] } }); class SourceLayerDirective extends LayerDirective { initialize(map, dataSource) { this.layer = this.buildLayer(dataSource); this.initializeEvents(map); map.layers.add(this.layer, this.before); } ; clear(map) { map.layers.remove(this.layer); this.layer = null; } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SourceLayerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: SourceLayerDirective, isStandalone: true, inputs: { dataSourceId: "dataSourceId", sourceLayer: "sourceLayer" }, usesInheritance: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SourceLayerDirective, decorators: [{ type: Directive }], propDecorators: { dataSourceId: [{ type: Input }], sourceLayer: [{ type: Input }] } }); class SymbolLayerDirective extends SourceLayerDirective { ngOnChanges() { if (this.layer) { this.layer.setOptions({ filter: this.filter, iconOptions: this.iconOptions, lineSpacing: this.lineSpacing, maxZoom: this.maxZoom, minZoom: this.minZoom, source: this.dataSourceId, sourceLayer: this.sourceLayer, placement: this.placement, textOptions: this.textOptions, visible: this.visible }); } } buildLayer(dataSource) { return new atlas.layer.SymbolLayer(dataSource, this.id, { filter: this.filter, iconOptions: this.iconOptions, lineSpacing: this.lineSpacing, maxZoom: this.maxZoom, minZoom: this.minZoom, source: this.dataSourceId, sourceLayer: this.sourceLayer, placement: this.placement, textOptions: this.textOptions, visible: this.visible }); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SymbolLayerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: SymbolLayerDirective, isStandalone: false, selector: "[map-symbol-layer], map-symbol-layer", inputs: { filter: "filter", iconOptions: "iconOptions", lineSpacing: "lineSpacing", maxZoom: "maxZoom", minZoom: "minZoom", placement: "placement", textOptions: "textOptions", visible: "visible" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SymbolLayerDirective, decorators: [{ type: Directive, args: [{ selector: '[map-symbol-layer], map-symbol-layer', standalone: false }] }], propDecorators: { filter: [{ type: Input }], iconOptions: [{ type: Input }], lineSpacing: [{ type: Input }], maxZoom: [{ type: Input }], minZoom: [{ type: Input }], placement: [{ type: Input }], textOptions: [{ type: Input }], visible: [{ type: Input }] } }); class BubbleLayerDirective extends SourceLayerDirective { ngOnChanges() { if (this.layer) { this.layer.setOptions({ blur: this.blur, color: this.color, filter: this.filter, maxZoom: this.maxZoom, minZoom: this.minZoom, opacity: this.opacity, pitchAlignment: this.pitchAlignment, radius: this.radius, source: this.dataSourceId, sourceLayer: this.sourceLayer, strokeColor: this.strokeColor, strokeOpacity: this.strokeOpacity, strokeWidth: this.strokeWidth, visible: this.visible }); } } buildLayer(dataSource) { return new atlas.layer.BubbleLayer(dataSource, this.id, { blur: this.blur, color: this.color, filter: this.filter, maxZoom: this.maxZoom, minZoom: this.minZoom, opacity: this.opacity, pitchAlignment: this.pitchAlignment, radius: this.radius, source: this.dataSourceId, sourceLayer: this.sourceLayer, strokeColor: this.strokeColor, strokeOpacity: this.strokeOpacity, strokeWidth: this.strokeWidth, visible: this.visible }); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: BubbleLayerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: BubbleLayerDirective, isStandalone: false, selector: "[map-bubble-layer], map-bubble-layer", inputs: { blur: "blur", color: "color", filter: "filter", maxZoom: "maxZoom", minZoom: "minZoom", opacity: "opacity", pitchAlignment: "pitchAlignment", radius: "radius", strokeColor: "strokeColor", strokeOpacity: "strokeOpacity", strokeWidth: "strokeWidth", visible: "visible" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: BubbleLayerDirective, decorators: [{ type: Directive, args: [{ selector: '[map-bubble-layer], map-bubble-layer', standalone: false }] }], propDecorators: { blur: [{ type: Input }], color: [{ type: Input }], filter: [{ type: Input }], maxZoom: [{ type: Input }], minZoom: [{ type: Input }], opacity: [{ type: Input }], pitchAlignment: [{ type: Input }], radius: [{ type: Input }], strokeColor: [{ type: Input }], strokeOpacity: [{ type: Input }], strokeWidth: [{ type: Input }], visible: [{ type: Input }] } }); class LineLayerDirective extends SourceLayerDirective { ngOnChanges() { if (this.layer) { this.layer.setOptions({ blur: this.blur, filter: this.filter, lineCap: this.lineCap, lineJoin: this.lineJoin, maxZoom: this.maxZoom, minZoom: this.minZoom, offset: this.offset, source: this.dataSourceId, sourceLayer: this.sourceLayer, strokeColor: this.strokeColor, strokeDashArray: this.strokeDashArray, strokeGradient: this.strokeGradient, strokeOpacity: this.strokeOpacity, strokeWidth: this.strokeWidth, translate: this.translate, translateAnchor: this.translateAnchor, visible: this.visible }); } } buildLayer(dataSource) { if (this.strokeGradient && dataSource.setOptions) { dataSource.setOptions({ lineMetrics: true }); } return new atlas.layer.LineLayer(dataSource, this.id, { blur: this.blur, filter: this.filter, lineCap: this.lineCap, lineJoin: this.lineJoin, maxZoom: this.maxZoom, minZoom: this.minZoom, offset: this.offset, source: this.dataSourceId, sourceLayer: this.sourceLayer, strokeColor: this.strokeColor, strokeDashArray: this.strokeDashArray, strokeGradient: this.strokeGradient, strokeOpacity: this.strokeOpacity, strokeWidth: this.strokeWidth, translate: this.translate, translateAnchor: this.translateAnchor, visible: this.visible }); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LineLayerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: LineLayerDirective, isStandalone: false, selector: "[map-line-layer], map-line-layer", inputs: { blur: "blur", filter: "filter", lineCap: "lineCap", lineJoin: "lineJoin", maxZoom: "maxZoom", minZoom: "minZoom", offset: "offset", strokeColor: "strokeColor", strokeDashArray: "strokeDashArray", strokeGradient: "strokeGradient", strokeOpacity: "strokeOpacity", strokeWidth: "strokeWidth", translate: "translate", translateAnchor: "translateAnchor", visible: "visible" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: LineLayerDirective, decorators: [{ type: Directive, args: [{ selector: '[map-line-layer], map-line-layer', standalone: false }] }], propDecorators: { blur: [{ type: Input }], filter: [{ type: Input }], lineCap: [{ type: Input }], lineJoin: [{ type: Input }], maxZoom: [{ type: Input }], minZoom: [{ type: Input }], offset: [{ type: Input }], strokeColor: [{ type: Input }], strokeDashArray: [{ type: Input }], strokeGradient: [{ type: Input }], strokeOpacity: [{ type: Input }], strokeWidth: [{ type: Input }], translate: [{ type: Input }], translateAnchor: [{ type: Input }], visible: [{ type: Input }] } }); class PolygonLayerDirective extends SourceLayerDirective { ngOnChanges() { if (this.layer) { this.layer.setOptions({ fillColor: this.fillColor, fillOpacity: this.fillOpacity, fillPattern: this.fillPattern, filter: this.filter, maxZoom: this.maxZoom, minZoom: this.minZoom, source: this.dataSourceId, sourceLayer: this.sourceLayer, visible: this.visible }); } } buildLayer(dataSource) { return new atlas.layer.PolygonLayer(dataSource, this.id, { fillColor: this.fillColor, fillOpacity: this.fillOpacity, fillPattern: this.fillPattern, filter: this.filter, maxZoom: this.maxZoom, minZoom: this.minZoom, source: this.dataSourceId, sourceLayer: this.sourceLayer, visible: this.visible }); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: PolygonLayerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: PolygonLayerDirective, isStandalone: false, selector: "[map-polygon-layer], map-polygon-layer", inputs: { fillColor: "fillColor", fillOpacity: "fillOpacity", fillPattern: "fillPattern", filter: "filter", maxZoom: "maxZoom", minZoom: "minZoom", visible: "visible" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: PolygonLayerDirective, decorators: [{ type: Directive, args: [{ selector: '[map-polygon-layer], map-polygon-layer', standalone: false }] }], propDecorators: { fillColor: [{ type: Input }], fillOpacity: [{ type: Input }], fillPattern: [{ type: Input }], filter: [{ type: Input }], maxZoom: [{ type: Input }], minZoom: [{ type: Input }], visible: [{ type: Input }] } }); class PolygonExtrusionLayerDirective extends SourceLayerDirective { ngOnChanges() { if (this.layer) { this.layer.setOptions({ base: this.base, fillColor: this.fillColor, fillOpacity: this.fillOpacity, fillPattern: this.fillPattern, filter: this.filter, height: this.height, maxZoom: this.maxZoom, minZoom: this.minZoom, source: this.dataSourceId, sourceLayer: this.sourceLayer, translate: this.translate, translateAnchor: this.translateAnchor, verticalGradient: this.verticalGradient, visible: this.visible }); } } buildLayer(dataSource) { return new atlas.layer.PolygonExtrusionLayer(dataSource, this.id, { base: this.base, fillColor: this.fillColor, fillOpacity: this.fillOpacity, fillPattern: this.fillPattern, filter: this.filter, height: this.height, maxZoom: this.maxZoom, minZoom: this.minZoom, source: this.dataSourceId, sourceLayer: this.sourceLayer, translate: this.translate, translateAnchor: this.translateAnchor, verticalGradient: this.verticalGradient, visible: this.visible }); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: PolygonExtrusionLayerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: PolygonExtrusionLayerDirective, isStandalone: false, selector: "[map-polygon-extrusion-layer], map-polygon-extrusion-layer", inputs: { base: "base", fillColor: "fillColor", fillOpacity: "fillOpacity", fillPattern: "fillPattern", filter: "filter", height: "height", maxZoom: "maxZoom", minZoom: "minZoom", translate: "translate", translateAnchor: "translateAnchor", verticalGradient: "verticalGradient", visible: "visible" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: PolygonExtrusionLayerDirective, decorators: [{ type: Directive, args: [{ selector: '[map-polygon-extrusion-layer], map-polygon-extrusion-layer', standalone: false }] }], propDecorators: { base: [{ type: Input }], fillColor: [{ type: Input }], fillOpacity: [{ type: Input }], fillPattern: [{ type: Input }], filter: [{ type: Input }], height: [{ type: Input }], maxZoom: [{ type: Input }], minZoom: [{ type: Input }], translate: [{ type: Input }], translateAnchor: [{ type: Input }], verticalGradient: [{ type: Input }], visible: [{ type: Input }] } }); class HeatmapLayerDirective extends SourceLayerDirective { ngOnChanges() { if (this.layer) { this.layer.setOptions({ color: this.color, filter: this.filter, intensity: this.intensity, maxZoom: this.maxZoom, minZoom: this.minZoom, opacity: this.opacity, radius: this.radius, source: this.dataSourceId, sourceLayer: this.sourceLayer, visible: this.visible, weight: this.weight }); } } buildLayer(dataSource) { return new atlas.layer.HeatMapLayer(dataSource, this.id, { color: this.color, filter: this.filter, intensity: this.intensity, maxZoom: this.maxZoom, minZoom: this.minZoom, opacity: this.opacity, radius: this.radius, source: this.dataSourceId, sourceLayer: this.sourceLayer, visible: this.visible, weight: this.weight }); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HeatmapLayerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: HeatmapLayerDirective, isStandalone: false, selector: "[map-heatmap-layer], map-heatmap-layer", inputs: { color: "color", filter: "filter", intensity: "intensity", maxZoom: "maxZoom", minZoom: "minZoom", opacity: "opacity", radius: "radius", visible: "visible", weight: "weight" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: HeatmapLayerDirective, decorators: [{ type: Directive, args: [{ selector: '[map-heatmap-layer], map-heatmap-layer', standalone: false }] }], propDecorators: { color: [{ type: Input }], filter: [{ type: Input }], intensity: [{ type: Input }], maxZoom: [{ type: Input }], minZoom: [{ type: Input }], opacity: [{ type: Input }], radius: [{ type: Input }], visible: [{ type: Input }], weight: [{ type: Input }] } }); class ImageLayerDirective extends LayerDirective { ngOnChanges() { if (this.layer) { this.layer.setOptions({ contrast: this.contrast, coordinates: this.coordinates, fadeDuration: this.fadeDuration, filter: this.filter, hueRotation: this.hueRotation, maxBrightness: this.maxBrightness, maxZoom: this.maxZoom, minBrightness: this.minBrightness, minZoom: this.minZoom, opacity: this.opacity, saturation: this.saturation, url: this.url, visible: this.visible }); } } initialize(map) { this.layer = new atlas.layer.ImageLayer({ contrast: this.contrast, coordinates: this.coordinates, fadeDuration: this.fadeDuration, filter: this.filter, hueRotation: this.hueRotation, maxBrightness: this.maxBrightness, maxZoom: this.maxZoom, minBrightness: this.minBrightness, minZoom: this.minZoom, opacity: this.opacity, saturation: this.saturation, url: this.url, visible: this.visible }); this.initializeEvents(map); map.layers.add(this.layer, this.before); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ImageLayerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: ImageLayerDirective, isStandalone: false, selector: "[map-image-layer], map-image-layer", inputs: { contrast: "contrast", coordinates: "coordinates", fadeDuration: "fadeDuration", filter: "filter", hueRotation: "hueRotation", maxBrightness: "maxBrightness", maxZoom: "maxZoom", minBrightness: "minBrightness", minZoom: "minZoom", opacity: "opacity", saturation: "saturation", url: "url", visible: "visible" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ImageLayerDirective, decorators: [{ type: Directive, args: [{ selector: '[map-image-layer], map-image-layer', standalone: false }] }], propDecorators: { contrast: [{ type: Input }], coordinates: [{ type: Input }], fadeDuration: [{ type: Input }], filter: [{ type: Input }], hueRotation: [{ type: Input }], maxBrightness: [{ type: Input }], maxZoom: [{ type: Input }], minBrightness: [{ type: Input }], minZoom: [{ type: Input }], opacity: [{ type: Input }], saturation: [{ type: Input }], url: [{ type: Input }], visible: [{ type: Input }] } }); class TileLayerDirective extends LayerDirective { ngOnChanges() { if (this.layer) { this.layer.setOptions({ bounds: this.bounds, contrast: this.contrast, fadeDuration: this.fadeDuration, filter: this.filter, hueRotation: this.hueRotation, isTMS: this.isTMS, maxBrightness: this.maxBrightness, maxSourceZoom: this.maxSourceZoom, maxZoom: this.maxZoom, minBrightness: this.minBrightness, minSourceZoom: this.minSourceZoom, minZoom: this.minZoom, opacity: this.opacity, saturation: this.saturation, subdomains: this.subdomains, tileSize: this.tileSize, tileUrl: this.tileUrl, visible: this.visible }); } } initialize(map) { this.layer = new atlas.layer.TileLayer({ bounds: this.bounds, contrast: this.contrast, fadeDuration: this.fadeDuration, filter: this.filter, hueRotation: this.hueRotation, isTMS: this.isTMS, maxBrightness: this.maxBrightness, maxSourceZoom: this.maxSourceZoom, maxZoom: this.maxZoom, minBrightness: this.minBrightness, minSourceZoom: this.minSourceZoom, minZoom: this.minZoom, opacity: this.opacity, saturation: this.saturation, subdomains: this.subdomains, tileSize: this.tileSize, tileUrl: this.tileUrl, visible: this.visible }, this.id); this.initializeEvents(map); map.layers.add(this.layer, this.before); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TileLayerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); } static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: TileLayerDirective, isStandalone: false, selector: "[map-tile-layer], map-tile-layer", inputs: { bounds: "bounds", contrast: "contrast", fadeDuration: "fadeDuration", filter: "filter", hueRotation: "hueRotation", isTMS: "isTMS", maxBrightness: "maxBrightness", maxSourceZoom: "maxSourceZoom", maxZoom: "maxZoom", minBrightness: "minBrightness", minSourceZoom: "minSourceZoom", minZoom: "minZoom", opacity: "opacity", saturation: "saturation", subdomains: "subdomains", tileSize: "tileSize", tileUrl: "tileUrl", visible: "visible" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TileLayerDirective, decorators: [{ type: Directive, args: [{ selector: '[map-tile-layer], map-tile-layer', standalone: false }] }], propDecorators: { bounds: [{ type: Input }], contrast: [{ type: Input }], fadeDuration: [{ type: Input }], filter: [{ type: Input }], hueRotation: [{ type: Input }], isTMS: [{ type: Input }], maxBrightness: [{ type: Input }], maxSourceZoom: [{ type: Input }], maxZoom: [{ type: Input }], minBrightness: [{ type: Input }], minSourceZoom: [{ type: Input }], minZoom: [{ type: Input }], opacity: [{ type: Input }], saturation: [{ type: Input }], subdomains: [{ type: Input }], tileSize: [{ type: Input }], tileUrl: [{ type: Input }], visible: [{ type: Input }] } }); class PopupDirective { constructor() { this._popupEvents = new Map([ ['close', e => this.onClose.next(this.toPopupEvent(e))], ['drag', e => this.onDrag.next(this.toPopupEvent(e))], ['dragend', e => this.onDragEnd.next(this.toPopupEvent(e))], ['dragstart', e => this.onDragStart.next(this.toPopupEvent(e))], ['open', e => this.onOpen.next(this.toPopupEvent(e))], ]); this.onClose = new Subject(); this.onDrag = new Subject(); this.onDragEnd = new Subject(); this.onDragStart = new Subject(); this.onOpen = new Subject(); } get hasMap() { return !!this._map; } ngOnChanges(changes) { if (this._popup) {