@bluehalo/ngx-leaflet 21.1.0 → 21.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGES.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 21.2.0
4
+ Add `(leafletOverlayAdd)` and `(leafletOverlayRemove)` output bindings to the `[leafletLayersControl]` directive. These pass through Leaflet's `overlayadd` and `overlayremove` map events, which fire when a user checks or unchecks an overlay in the layers control. Event data is typed as `LayersControlEvent` (provides `layer` and `name`). Closes #285.
5
+
6
+ ## 21.1.1
7
+ Fix "listener not found" console warnings when a component using `[leafletBaseLayers]` is destroyed. The root cause was a non-deterministic destruction order between sibling Angular directives — if `LeafletDirective` destroyed first, its map cleanup already removed the layer event listeners that `LeafletBaseLayersDirective` then tried to remove again. Fix: listen to Leaflet's `unload` event to detect when the map has been removed and skip the redundant layer cleanup in that case (fixes #334).
8
+
3
9
  ## 21.1.0
4
10
  Improve type definitions across directives and models — replace `any` with proper Leaflet types (`TileLayerOptions`, `Control.LayersOptions`, `ReturnType<typeof setTimeout>`, etc.). TypeScript consumers benefit from better type safety and IDE support. Note: if you were relying on `any` to pass plugin-extended option types, you may need to cast to the appropriate base type (fixes #385).
5
11
 
@@ -621,6 +621,9 @@ class LeafletLayersControlDirective {
621
621
  this.differs = differs;
622
622
  this.zone = zone;
623
623
  this.layersControlReady = new EventEmitter();
624
+ // Overlay events — fired by the map when a user checks/unchecks an overlay in the layers control
625
+ this.onOverlayAdd = new EventEmitter();
626
+ this.onOverlayRemove = new EventEmitter();
624
627
  this.leafletDirective = new LeafletDirectiveWrapper(leafletDirective);
625
628
  this.controlLayers = new LeafletControlLayersWrapper(this.zone, this.layersControlReady);
626
629
  // Generate differs
@@ -636,10 +639,21 @@ class LeafletLayersControlDirective {
636
639
  this.controlLayers
637
640
  .init({}, this.layersControlOptions)
638
641
  .addTo(this.leafletDirective.getMap());
642
+ // Register overlay event pass-throughs
643
+ const map = this.leafletDirective.getMap();
644
+ this.overlayAddHandler = (e) => LeafletUtil.handleEvent(this.zone, this.onOverlayAdd, e);
645
+ this.overlayRemoveHandler = (e) => LeafletUtil.handleEvent(this.zone, this.onOverlayRemove, e);
646
+ map.on('overlayadd', this.overlayAddHandler);
647
+ map.on('overlayremove', this.overlayRemoveHandler);
639
648
  });
640
649
  this.updateLayers();
641
650
  }
642
651
  ngOnDestroy() {
652
+ const map = this.leafletDirective.getMap();
653
+ if (null != map) {
654
+ map.off('overlayadd', this.overlayAddHandler);
655
+ map.off('overlayremove', this.overlayRemoveHandler);
656
+ }
643
657
  this.layersControlConfig = { baseLayers: {}, overlays: {} };
644
658
  this.controlLayers.getLayersControl().remove();
645
659
  }
@@ -663,7 +677,7 @@ class LeafletLayersControlDirective {
663
677
  }
664
678
  }
665
679
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: LeafletLayersControlDirective, deps: [{ token: LeafletDirective }, { token: i0.KeyValueDiffers }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive }); }
666
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.3", type: LeafletLayersControlDirective, isStandalone: true, selector: "[leafletLayersControl]", inputs: { layersControlConfig: ["leafletLayersControl", "layersControlConfig"], layersControlOptions: ["leafletLayersControlOptions", "layersControlOptions"] }, outputs: { layersControlReady: "leafletLayersControlReady" }, ngImport: i0 }); }
680
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.3", type: LeafletLayersControlDirective, isStandalone: true, selector: "[leafletLayersControl]", inputs: { layersControlConfig: ["leafletLayersControl", "layersControlConfig"], layersControlOptions: ["leafletLayersControlOptions", "layersControlOptions"] }, outputs: { layersControlReady: "leafletLayersControlReady", onOverlayAdd: "leafletOverlayAdd", onOverlayRemove: "leafletOverlayRemove" }, ngImport: i0 }); }
667
681
  }
668
682
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: LeafletLayersControlDirective, decorators: [{
669
683
  type: Directive,
@@ -679,6 +693,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
679
693
  }], layersControlReady: [{
680
694
  type: Output,
681
695
  args: ['leafletLayersControlReady']
696
+ }], onOverlayAdd: [{
697
+ type: Output,
698
+ args: ['leafletOverlayAdd']
699
+ }], onOverlayRemove: [{
700
+ type: Output,
701
+ args: ['leafletOverlayRemove']
682
702
  }] } });
683
703
 
684
704
  /**
@@ -706,12 +726,19 @@ class LeafletBaseLayersDirective {
706
726
  this.zone = zone;
707
727
  // Output for once the layers control is ready
708
728
  this.layersControlReady = new EventEmitter();
729
+ // Track whether the map has been removed, to avoid redundant cleanup on destroy
730
+ this.mapUnloaded = false;
709
731
  this.leafletDirective = new LeafletDirectiveWrapper(leafletDirective);
710
732
  this.controlLayers = new LeafletControlLayersWrapper(this.zone, this.layersControlReady);
711
733
  this.baseLayersDiffer = this.differs.find({}).create();
712
734
  }
713
735
  ngOnDestroy() {
714
- this.baseLayers = {};
736
+ // Only clean up layer listeners from the control if the map is still alive.
737
+ // If the map was already removed (mapUnloaded=true), its teardown already cleared
738
+ // those listeners — calling removeLayer() again would produce "listener not found" warnings.
739
+ if (!this.mapUnloaded) {
740
+ this.baseLayers = {};
741
+ }
715
742
  if (null != this.controlLayers.getLayersControl()) {
716
743
  this.controlLayers.getLayersControl().remove();
717
744
  }
@@ -719,12 +746,14 @@ class LeafletBaseLayersDirective {
719
746
  ngOnInit() {
720
747
  // Init the map
721
748
  this.leafletDirective.init();
722
- // Create the control outside angular to prevent events from triggering chnage detection
749
+ // Create the control outside angular to prevent events from triggering change detection
723
750
  this.zone.runOutsideAngular(() => {
724
751
  // Initially configure the controlLayers
725
752
  this.controlLayers
726
753
  .init({}, this.layersControlOptions)
727
754
  .addTo(this.leafletDirective.getMap());
755
+ // Track map removal so ngOnDestroy can skip redundant layer cleanup
756
+ this.leafletDirective.getMap().on('unload', () => { this.mapUnloaded = true; });
728
757
  });
729
758
  this.updateBaseLayers();
730
759
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bluehalo-ngx-leaflet.mjs","sources":["../../../projects/ngx-leaflet/src/lib/core/leaflet.util.ts","../../../projects/ngx-leaflet/src/lib/core/leaflet.directive.ts","../../../projects/ngx-leaflet/src/lib/core/leaflet.directive.wrapper.ts","../../../projects/ngx-leaflet/src/lib/layers/leaflet-layer.directive.ts","../../../projects/ngx-leaflet/src/lib/layers/leaflet-layers.directive.ts","../../../projects/ngx-leaflet/src/lib/layers/control/leaflet-control-layers-changes.model.ts","../../../projects/ngx-leaflet/src/lib/layers/control/leaflet-control-layers.wrapper.ts","../../../projects/ngx-leaflet/src/lib/layers/control/leaflet-control-layers-config.model.ts","../../../projects/ngx-leaflet/src/lib/layers/control/leaflet-control-layers.directive.ts","../../../projects/ngx-leaflet/src/lib/layers/base/leaflet-baselayers.directive.ts","../../../projects/ngx-leaflet/src/lib/leaflet.module.ts","../../../projects/ngx-leaflet/src/lib/layers/leaflet-tile-layer-definition.model.ts","../../../projects/ngx-leaflet/src/bluehalo-ngx-leaflet.ts"],"sourcesContent":["import { EventEmitter, NgZone } from '@angular/core';\n\nexport class LeafletUtil {\n\n static mapToArray<T>(map: { [ key: string ]: T }): T[] {\n const toReturn: T[] = [];\n\n for (const k in map) {\n if (map.hasOwnProperty(k)) {\n toReturn.push(map[k]);\n }\n }\n\n return toReturn;\n }\n\n static handleEvent<T>(zone: NgZone, eventEmitter: EventEmitter<T>, event: T) {\n\n // Don't want to emit if there are no observers\n if (0 < eventEmitter.observers.length) {\n zone.run(() => {\n eventEmitter.emit(event);\n });\n }\n\n }\n}\n","import {\n Directive, ElementRef, EventEmitter, HostListener, Input, NgZone, OnChanges, OnDestroy, OnInit, Output,\n SimpleChange\n} from '@angular/core';\n\nimport { latLng, LatLng, LatLngBounds, LeafletEvent, LeafletMouseEvent, map, Map, MapOptions } from 'leaflet';\n\nimport { LeafletUtil } from './leaflet.util';\n\n@Directive({\n selector: '[leaflet]',\n})\nexport class LeafletDirective\n implements OnChanges, OnDestroy, OnInit {\n\n readonly DEFAULT_ZOOM = 1;\n readonly DEFAULT_CENTER = latLng(38.907192, -77.036871);\n readonly DEFAULT_FPZ_OPTIONS = {};\n\n resizeTimer: ReturnType<typeof setTimeout> | null;\n\n // Reference to the primary map object\n map: Map;\n\n @Input('leafletFitBoundsOptions') fitBoundsOptions = this.DEFAULT_FPZ_OPTIONS;\n @Input('leafletPanOptions') panOptions = this.DEFAULT_FPZ_OPTIONS;\n @Input('leafletZoomOptions') zoomOptions = this.DEFAULT_FPZ_OPTIONS;\n @Input('leafletZoomPanOptions') zoomPanOptions = this.DEFAULT_FPZ_OPTIONS;\n\n\n // Default configuration\n @Input('leafletOptions') options: MapOptions = {};\n\n // Configure callback function for the map\n @Output('leafletMapReady') mapReady = new EventEmitter<Map>();\n\n // Zoom level for the map\n @Input('leafletZoom') zoom: number;\n @Output('leafletZoomChange') zoomChange = new EventEmitter<number>();\n\n // Center of the map\n @Input('leafletCenter') center: LatLng;\n @Output('leafletCenterChange') centerChange = new EventEmitter<LatLng>();\n\n // Set fit bounds for map\n @Input('leafletFitBounds') fitBounds: LatLngBounds;\n\n // Set the max bounds for the map\n @Input('leafletMaxBounds') maxBounds: LatLngBounds;\n\n // Set the min zoom for the map\n @Input('leafletMinZoom') minZoom: number;\n\n // Set the max zoom for the map\n @Input('leafletMaxZoom') maxZoom: number;\n\n\n // Mouse Map Events\n @Output('leafletClick') onClick = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletDoubleClick') onDoubleClick = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletMouseDown') onMouseDown = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletMouseUp') onMouseUp = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletMouseMove') onMouseMove = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletMouseOver') onMouseOver = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletMouseOut') onMouseOut = new EventEmitter<LeafletMouseEvent>();\n\n // Map Move Events\n @Output('leafletMapMove') onMapMove = new EventEmitter<LeafletEvent>();\n @Output('leafletMapMoveStart') onMapMoveStart = new EventEmitter<LeafletEvent>();\n @Output('leafletMapMoveEnd') onMapMoveEnd = new EventEmitter<LeafletEvent>();\n\n // Map Zoom Events\n @Output('leafletMapZoom') onMapZoom = new EventEmitter<LeafletEvent>();\n @Output('leafletMapZoomStart') onMapZoomStart = new EventEmitter<LeafletEvent>();\n @Output('leafletMapZoomEnd') onMapZoomEnd = new EventEmitter<LeafletEvent>();\n\n constructor(private element: ElementRef, private zone: NgZone) {\n // Nothing here\n }\n\n ngOnInit() {\n\n // Create the map outside of angular so the various map events don't trigger change detection\n this.zone.runOutsideAngular(() => {\n\n // Create the map with some reasonable defaults\n this.map = map(this.element.nativeElement, this.options);\n this.addMapEventListeners();\n\n });\n\n // Only setView if there is a center/zoom\n if (null != this.center && null != this.zoom) {\n this.setView(this.center, this.zoom);\n }\n\n // Set up all the initial settings\n if (null != this.fitBounds) {\n this.setFitBounds(this.fitBounds);\n }\n\n if (null != this.maxBounds) {\n this.setMaxBounds(this.maxBounds);\n }\n\n if (null != this.minZoom) {\n this.setMinZoom(this.minZoom);\n }\n\n if (null != this.maxZoom) {\n this.setMaxZoom(this.maxZoom);\n }\n\n this.doResize();\n\n // Fire map ready event\n this.mapReady.emit(this.map);\n\n }\n\n ngOnChanges(changes: { [key: string]: SimpleChange }) {\n\n /*\n * The following code is to address an issue with our (basic) implementation of\n * zooming and panning. From our testing, it seems that a pan operation followed\n * by a zoom operation in the same thread will interfere with each other. The zoom\n * operation interrupts/cancels the pan, resulting in a final center point that is\n * inaccurate. The solution seems to be to either separate them with a timeout or\n * to collapse them into a setView call.\n */\n\n // Zooming and Panning\n if (changes['zoom'] && changes['center'] && null != this.zoom && null != this.center) {\n this.setView(changes['center'].currentValue, changes['zoom'].currentValue);\n }\n // Set the zoom level\n else if (changes['zoom']) {\n this.setZoom(changes['zoom'].currentValue);\n }\n // Set the map center\n else if (changes['center']) {\n this.setCenter(changes['center'].currentValue);\n }\n\n // Other options\n if (changes['fitBounds']) {\n this.setFitBounds(changes['fitBounds'].currentValue);\n }\n\n if (changes['maxBounds']) {\n this.setMaxBounds(changes['maxBounds'].currentValue);\n }\n\n if (changes['minZoom']) {\n this.setMinZoom(changes['minZoom'].currentValue);\n }\n\n if (changes['maxZoom']) {\n this.setMaxZoom(changes['maxZoom'].currentValue);\n }\n\n }\n\n ngOnDestroy() {\n // If this directive is destroyed, the map is too\n if (null != this.map) {\n this.map.off();\n this.map.remove();\n }\n }\n\n public getMap() {\n return this.map;\n }\n\n\n @HostListener('window:resize', [])\n onResize() {\n this.delayResize();\n }\n\n private addMapEventListeners() {\n\n const registerEventHandler = (eventName: string, handler: (e: LeafletEvent) => void) => {\n this.map.on(eventName, handler);\n };\n\n\n // Add all the pass-through mouse event handlers\n registerEventHandler('click', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onClick, e));\n registerEventHandler('dblclick', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onDoubleClick, e));\n registerEventHandler('mousedown', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseDown, e));\n registerEventHandler('mouseup', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseUp, e));\n registerEventHandler('mouseover', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseOver, e));\n registerEventHandler('mouseout', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseOut, e));\n registerEventHandler('mousemove', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseMove, e));\n\n registerEventHandler('zoomstart', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapZoomStart, e));\n registerEventHandler('zoom', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapZoom, e));\n registerEventHandler('zoomend', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapZoomEnd, e));\n registerEventHandler('movestart', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapMoveStart, e));\n registerEventHandler('move', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapMove, e));\n registerEventHandler('moveend', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapMoveEnd, e));\n\n\n // Update any things for which we provide output bindings\n const outputUpdateHandler = () => {\n const zoom = this.map.getZoom();\n if (zoom !== this.zoom) {\n this.zoom = zoom;\n LeafletUtil.handleEvent(this.zone, this.zoomChange, zoom);\n }\n\n const center = this.map.getCenter();\n if (null != center || null != this.center) {\n\n if (((null == center || null == this.center) && center !== this.center)\n || (center.lat !== this.center.lat || center.lng !== this.center.lng)) {\n\n this.center = center;\n LeafletUtil.handleEvent(this.zone, this.centerChange, center);\n\n }\n }\n };\n\n registerEventHandler('moveend', outputUpdateHandler);\n registerEventHandler('zoomend', outputUpdateHandler);\n }\n\n /**\n * Resize the map to fit it's parent container\n */\n private doResize() {\n\n // Run this outside of angular so the map events stay outside of angular\n this.zone.runOutsideAngular(() => {\n\n // Invalidate the map size to trigger it to update itself\n if (null != this.map) {\n this.map.invalidateSize({});\n }\n\n });\n\n }\n\n /**\n * Manage a delayed resize of the component\n */\n private delayResize() {\n if (null != this.resizeTimer) {\n clearTimeout(this.resizeTimer);\n }\n this.resizeTimer = setTimeout(this.doResize.bind(this), 200);\n }\n\n\n /**\n * Set the view (center/zoom) all at once\n * @param center The new center\n * @param zoom The new zoom level\n */\n private setView(center: LatLng, zoom: number) {\n\n if (null != this.map && null != center && null != zoom) {\n this.map.setView(center, zoom, this.zoomPanOptions);\n }\n\n }\n\n /**\n * Set the map zoom level\n * @param zoom the new zoom level for the map\n */\n private setZoom(zoom: number) {\n\n if (null != this.map && null != zoom) {\n this.map.setZoom(zoom, this.zoomOptions);\n }\n\n }\n\n /**\n * Set the center of the map\n * @param center the center point\n */\n private setCenter(center: LatLng) {\n\n if (null != this.map && null != center) {\n this.map.panTo(center, this.panOptions);\n }\n\n }\n\n /**\n * Fit the map to the bounds\n * @param latLngBounds the boundary to set\n */\n private setFitBounds(latLngBounds: LatLngBounds) {\n\n if (null != this.map && null != latLngBounds) {\n this.map.fitBounds(latLngBounds, this.fitBoundsOptions);\n }\n\n }\n\n /**\n * Set the map's max bounds\n * @param latLngBounds the boundary to set\n */\n private setMaxBounds(latLngBounds: LatLngBounds) {\n\n if (null != this.map && null != latLngBounds) {\n this.map.setMaxBounds(latLngBounds);\n }\n\n }\n\n /**\n * Set the map's min zoom\n * @param number the new min zoom\n */\n private setMinZoom(zoom: number) {\n\n if (null != this.map && null != zoom) {\n this.map.setMinZoom(zoom);\n }\n\n }\n\n /**\n * Set the map's min zoom\n * @param number the new min zoom\n */\n private setMaxZoom(zoom: number) {\n\n if (null != this.map && null != zoom) {\n this.map.setMaxZoom(zoom);\n }\n\n }\n\n}\n","import { LeafletDirective } from './leaflet.directive';\n\nimport { Map } from 'leaflet';\n\nexport class LeafletDirectiveWrapper {\n\n // Reference to the main leaflet directive\n protected leafletDirective: LeafletDirective;\n\n constructor(leafletDirective: LeafletDirective) {\n this.leafletDirective = leafletDirective;\n }\n\n init() {\n // Nothing for now\n }\n\n getMap(): Map {\n return this.leafletDirective.getMap();\n }\n\n}\n","import {\n Directive, EventEmitter, Input, NgZone, OnChanges, OnDestroy, OnInit, Output,\n SimpleChange\n} from '@angular/core';\n\nimport { Layer, LeafletEvent } from 'leaflet';\n\nimport { LeafletDirective } from '../core/leaflet.directive';\nimport { LeafletDirectiveWrapper } from '../core/leaflet.directive.wrapper';\nimport { LeafletUtil } from '../core/leaflet.util';\n\n\n/**\n * Layer directive\n *\n * This directive is used to directly control a single map layer. The purpose of this directive is to\n * be used as part of a child structural directive of the map element.\n *\n */\n@Directive({\n selector: '[leafletLayer]',\n})\nexport class LeafletLayerDirective\n implements OnChanges, OnDestroy, OnInit {\n\n @Input('leafletLayer') layer: Layer;\n\n // Layer Events\n @Output('leafletLayerAdd') onAdd = new EventEmitter<LeafletEvent>();\n @Output('leafletLayerRemove') onRemove = new EventEmitter<LeafletEvent>();\n\n // Layer Event handlers\n private onAddLayerHandler: (event: LeafletEvent) => void;\n private onRemoveLayerHandler: (event: LeafletEvent) => void;\n\n // Wrapper for the leaflet directive (manages the parent directive)\n private leafletDirective: LeafletDirectiveWrapper;\n\n constructor(leafletDirective: LeafletDirective, private zone: NgZone) {\n this.leafletDirective = new LeafletDirectiveWrapper(leafletDirective);\n }\n\n ngOnInit() {\n\n // Init the map\n this.leafletDirective.init();\n\n }\n\n ngOnDestroy() {\n\n if (null != this.layer) {\n\n // Unregister the event handlers\n this.removeLayerEventListeners(this.layer);\n\n // Remove the layer from the map\n this.layer.remove();\n }\n\n }\n\n ngOnChanges(changes: { [key: string]: SimpleChange }) {\n\n if (changes['layer']) {\n\n // Update the layer\n const p: Layer = changes['layer'].previousValue;\n const n = changes['layer'].currentValue;\n\n this.zone.runOutsideAngular(() => {\n if (null != p) {\n this.removeLayerEventListeners(p);\n p.remove();\n }\n if (null != n) {\n this.addLayerEventListeners(n);\n this.leafletDirective.getMap().addLayer(n);\n }\n });\n\n }\n\n }\n\n private addLayerEventListeners(l: Layer) {\n\n this.onAddLayerHandler = (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onAdd, e);\n l.on('add', this.onAddLayerHandler);\n\n this.onRemoveLayerHandler = (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onRemove, e);\n l.on('remove', this.onRemoveLayerHandler);\n\n }\n\n private removeLayerEventListeners(l: Layer) {\n\n l.off('add', this.onAddLayerHandler);\n l.off('remove', this.onRemoveLayerHandler);\n\n }\n\n}\n","import { Directive, DoCheck, Input, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit } from '@angular/core';\n\nimport { Layer} from 'leaflet';\n\nimport { LeafletDirective } from '../core/leaflet.directive';\nimport { LeafletDirectiveWrapper } from '../core/leaflet.directive.wrapper';\n\n\n/**\n * Layers directive\n *\n * This directive is used to directly control map layers. As changes are made to the input array of\n * layers, the map is synched to the array. As layers are added or removed from the input array, they\n * are also added or removed from the map. The input array is treated as immutable. To detect changes,\n * you must change the array instance.\n *\n * Important Note: The input layers array is assumed to be immutable. This means you need to use an\n * immutable array implementation or create a new copy of your array when you make changes, otherwise\n * this directive won't detect the change. This is by design. It's for performance reasons. Change\n * detection of mutable arrays requires diffing the state of the array on every DoCheck cycle, which\n * is extremely expensive from a time complexity perspective.\n *\n */\n@Directive({\n selector: '[leafletLayers]',\n})\nexport class LeafletLayersDirective\n implements DoCheck, OnDestroy, OnInit {\n\n // Array of configured layers\n layersValue: Layer[];\n\n // Differ to do change detection on the array\n layersDiffer: IterableDiffer<Layer>;\n\n // Set/get the layers\n @Input('leafletLayers')\n set layers(v: Layer[]) {\n this.layersValue = v;\n\n // Now that we have a differ, do an immediate layer update\n this.updateLayers();\n }\n get layers(): Layer[] {\n return this.layersValue;\n }\n\n // Wrapper for the leaflet directive (manages the parent directive)\n private leafletDirective: LeafletDirectiveWrapper;\n\n constructor(leafletDirective: LeafletDirective, private differs: IterableDiffers, private zone: NgZone) {\n this.leafletDirective = new LeafletDirectiveWrapper(leafletDirective);\n this.layersDiffer = this.differs.find([]).create<Layer>();\n }\n\n ngDoCheck() {\n this.updateLayers();\n }\n\n ngOnInit() {\n\n // Init the map\n this.leafletDirective.init();\n\n // Update layers once the map is ready\n this.updateLayers();\n\n }\n\n ngOnDestroy() {\n this.layers = [];\n }\n\n /**\n * Update the state of the layers.\n * We use an iterable differ to synchronize the map layers with the state of the bound layers array.\n * This is important because it allows us to react to changes to the contents of the array as well\n * as changes to the actual array instance.\n */\n private updateLayers() {\n\n const map = this.leafletDirective.getMap();\n\n if (null != map && null != this.layersDiffer) {\n\n const changes = this.layersDiffer.diff(this.layersValue);\n if (null != changes) {\n\n // Run outside angular to ensure layer events don't trigger change detection\n this.zone.runOutsideAngular(() => {\n\n changes.forEachRemovedItem((c) => {\n map.removeLayer(c.item);\n });\n changes.forEachAddedItem((c) => {\n map.addLayer(c.item);\n });\n\n });\n\n }\n\n }\n\n }\n\n}\n","export class LeafletControlLayersChanges {\n layersRemoved: number = 0;\n layersChanged: number = 0;\n layersAdded: number = 0;\n\n changed(): boolean {\n return !(this.layersRemoved === 0 && this.layersChanged === 0 && this.layersAdded === 0);\n }\n}\n","import { EventEmitter, KeyValueChanges, NgZone } from '@angular/core';\n\nimport { control, Control, Layer } from 'leaflet';\n\nimport { LeafletControlLayersChanges } from './leaflet-control-layers-changes.model';\n\nexport class LeafletControlLayersWrapper {\n\n // The layers control object\n protected layersControl: Control.Layers;\n\n // Event Emitter for when the control is ready\n protected layersControlReady: EventEmitter<Control.Layers>;\n\n constructor(private zone: NgZone, layersControlReady: EventEmitter<Control.Layers>) {\n this.layersControlReady = layersControlReady;\n }\n\n getLayersControl() {\n return this.layersControl;\n }\n\n init(controlConfig: { baseLayers?: { [name: string]: Layer }, overlays?: { [name: string]: Layer } }, controlOptions: Control.LayersOptions): Control.Layers {\n\n const baseLayers = controlConfig.baseLayers || {};\n const overlays = controlConfig.overlays || {};\n\n // Create the control outside of angular to ensure events don't trigger change detection\n this.zone.runOutsideAngular(() => {\n this.layersControl = control.layers(baseLayers, overlays, controlOptions);\n });\n\n\n this.layersControlReady.emit(this.layersControl);\n\n return this.layersControl;\n }\n\n applyBaseLayerChanges(changes: KeyValueChanges<string, Layer>): LeafletControlLayersChanges {\n let results: LeafletControlLayersChanges = new LeafletControlLayersChanges();\n\n if (null != this.layersControl) {\n results = this.applyChanges(changes, this.layersControl.addBaseLayer);\n }\n\n return results;\n }\n\n applyOverlayChanges(changes: KeyValueChanges<string, Layer>): LeafletControlLayersChanges {\n let results: LeafletControlLayersChanges = new LeafletControlLayersChanges();\n\n if (null != this.layersControl) {\n results = this.applyChanges(changes, this.layersControl.addOverlay);\n }\n\n return results;\n }\n\n private applyChanges(changes: KeyValueChanges<string, Layer>, addFn: (layer: Layer, name: string) => void): LeafletControlLayersChanges {\n const results: LeafletControlLayersChanges = new LeafletControlLayersChanges();\n\n if (null != changes) {\n\n // All layer management is outside angular to avoid layer events from triggering change detection\n this.zone.runOutsideAngular(() => {\n\n changes.forEachChangedItem((c) => {\n this.layersControl.removeLayer(c.previousValue);\n addFn.call(this.layersControl, c.currentValue, c.key);\n results.layersChanged++;\n });\n changes.forEachRemovedItem((c) => {\n this.layersControl.removeLayer(c.previousValue);\n results.layersRemoved++;\n });\n changes.forEachAddedItem((c) => {\n addFn.call(this.layersControl, c.currentValue, c.key);\n results.layersAdded++;\n });\n\n });\n\n }\n\n return results;\n }\n\n}\n","import { Layer } from 'leaflet';\n\nexport class LeafletControlLayersConfig {\n baseLayers: { [name: string]: Layer } = {};\n overlays: { [name: string]: Layer } = {};\n}\n","import {\n Directive, DoCheck, EventEmitter, Input, KeyValueDiffer, KeyValueDiffers, NgZone, OnDestroy, OnInit,\n Output\n} from '@angular/core';\n\nimport { Control, Layer } from 'leaflet';\n\nimport { LeafletDirective } from '../../core/leaflet.directive';\nimport { LeafletDirectiveWrapper } from '../../core/leaflet.directive.wrapper';\nimport { LeafletControlLayersWrapper } from './leaflet-control-layers.wrapper';\nimport { LeafletControlLayersConfig } from './leaflet-control-layers-config.model';\n\n\n/**\n * Layers Control\n *\n * This directive is used to configure the layers control. The input accepts an object with two\n * key-value maps of layer name -> layer. Mutable changes are detected. On changes, a differ is\n * used to determine what changed so that layers are appropriately added or removed.\n *\n * To specify which layer to show as the 'active' baselayer, you will want to add it to the map\n * using the layers directive. Otherwise, the last one it sees will be used.\n */\n@Directive({\n selector: '[leafletLayersControl]',\n})\nexport class LeafletLayersControlDirective\n implements DoCheck, OnDestroy, OnInit {\n\n // Control Layers Configuration\n layersControlConfigValue: LeafletControlLayersConfig;\n\n baseLayersDiffer: KeyValueDiffer<string, Layer>;\n overlaysDiffer: KeyValueDiffer<string, Layer>;\n\n @Input('leafletLayersControl')\n set layersControlConfig(v: LeafletControlLayersConfig) {\n\n // Validation/init stuff\n if (null == v) { v = new LeafletControlLayersConfig(); }\n if (null == v.baseLayers) { v.baseLayers = {}; }\n if (null == v.overlays) { v.overlays = {}; }\n\n // Store the value\n this.layersControlConfigValue = v;\n\n // Update the map\n this.updateLayers();\n\n }\n get layersControlConfig(): LeafletControlLayersConfig {\n return this.layersControlConfigValue;\n }\n\n @Input('leafletLayersControlOptions') layersControlOptions: Control.LayersOptions;\n\n @Output('leafletLayersControlReady') layersControlReady = new EventEmitter<Control.Layers>();\n\n private controlLayers: LeafletControlLayersWrapper;\n private leafletDirective: LeafletDirectiveWrapper;\n\n constructor(leafletDirective: LeafletDirective, private differs: KeyValueDiffers, private zone: NgZone) {\n this.leafletDirective = new LeafletDirectiveWrapper(leafletDirective);\n this.controlLayers = new LeafletControlLayersWrapper(this.zone, this.layersControlReady);\n\n // Generate differs\n this.baseLayersDiffer = this.differs.find({}).create<string, Layer>();\n this.overlaysDiffer = this.differs.find({}).create<string, Layer>();\n\n }\n\n ngOnInit() {\n\n // Init the map\n this.leafletDirective.init();\n\n // Set up control outside of angular to avoid change detection when using the control\n this.zone.runOutsideAngular(() => {\n\n // Set up all the initial settings\n this.controlLayers\n .init({}, this.layersControlOptions)\n .addTo(this.leafletDirective.getMap());\n\n });\n\n this.updateLayers();\n\n }\n\n ngOnDestroy() {\n this.layersControlConfig = { baseLayers: {}, overlays: {} };\n this.controlLayers.getLayersControl().remove();\n }\n\n ngDoCheck() {\n this.updateLayers();\n }\n\n protected updateLayers() {\n\n const map = this.leafletDirective.getMap();\n const layersControl = this.controlLayers.getLayersControl();\n\n if (null != map && null != layersControl) {\n\n // Run the baselayers differ\n if (null != this.baseLayersDiffer && null != this.layersControlConfigValue.baseLayers) {\n const changes = this.baseLayersDiffer.diff(this.layersControlConfigValue.baseLayers);\n this.controlLayers.applyBaseLayerChanges(changes);\n }\n\n // Run the overlays differ\n if (null != this.overlaysDiffer && null != this.layersControlConfigValue.overlays) {\n const changes = this.overlaysDiffer.diff(this.layersControlConfigValue.overlays);\n this.controlLayers.applyOverlayChanges(changes);\n }\n\n }\n\n }\n\n}\n","import {\n Directive, DoCheck, EventEmitter, Input, KeyValueDiffer, KeyValueDiffers, NgZone, OnDestroy,\n OnInit, Output\n} from '@angular/core';\n\nimport { Control, Layer } from 'leaflet';\n\nimport { LeafletUtil } from '../../core/leaflet.util';\nimport { LeafletDirective } from '../../core/leaflet.directive';\nimport { LeafletDirectiveWrapper } from '../../core/leaflet.directive.wrapper';\nimport { LeafletControlLayersWrapper } from '../control/leaflet-control-layers.wrapper';\n\n\n/**\n * Baselayers directive\n *\n * This directive is provided as a convenient way to add baselayers to the map. The input accepts\n * a key-value map of layer name -> layer. Mutable changed are detected. On changes, a differ is\n * used to determine what changed so that layers are appropriately added or removed. This directive\n * will also add the layers control so users can switch between available base layers.\n *\n * To specify which layer to show as the 'active' baselayer, you will want to add it to the map\n * using the layers directive. Otherwise, the plugin will use the last one it sees.\n */\n@Directive({\n selector: '[leafletBaseLayers]',\n})\nexport class LeafletBaseLayersDirective\n implements DoCheck, OnDestroy, OnInit {\n\n // Base Layers\n baseLayersValue: { [name: string]: Layer };\n\n // Base Layers Map Differ\n baseLayersDiffer: KeyValueDiffer<string, Layer>;\n\n // Set/get baseLayers\n @Input('leafletBaseLayers')\n set baseLayers(v: { [name: string]: Layer }) {\n this.baseLayersValue = v;\n\n this.updateBaseLayers();\n }\n get baseLayers(): { [name: string]: Layer } {\n return this.baseLayersValue;\n }\n\n // Control Options\n @Input('leafletLayersControlOptions') layersControlOptions: Control.LayersOptions;\n\n // Output for once the layers control is ready\n @Output('leafletLayersControlReady') layersControlReady = new EventEmitter<Control.Layers>();\n\n // Active Base Layer\n private baseLayer: Layer;\n\n private leafletDirective: LeafletDirectiveWrapper;\n private controlLayers: LeafletControlLayersWrapper;\n\n constructor(leafletDirective: LeafletDirective, private differs: KeyValueDiffers, private zone: NgZone) {\n this.leafletDirective = new LeafletDirectiveWrapper(leafletDirective);\n this.controlLayers = new LeafletControlLayersWrapper(this.zone, this.layersControlReady);\n this.baseLayersDiffer = this.differs.find({}).create<string, Layer>();\n }\n\n ngOnDestroy() {\n this.baseLayers = {};\n if (null != this.controlLayers.getLayersControl()) {\n this.controlLayers.getLayersControl().remove();\n }\n }\n\n ngOnInit() {\n\n // Init the map\n this.leafletDirective.init();\n\n // Create the control outside angular to prevent events from triggering chnage detection\n this.zone.runOutsideAngular(() => {\n\n // Initially configure the controlLayers\n this.controlLayers\n .init({}, this.layersControlOptions)\n .addTo(this.leafletDirective.getMap());\n\n });\n\n this.updateBaseLayers();\n\n }\n\n ngDoCheck() {\n this.updateBaseLayers();\n }\n\n protected updateBaseLayers() {\n\n const map = this.leafletDirective.getMap();\n const layersControl = this.controlLayers.getLayersControl();\n\n if (null != map && null != layersControl && null != this.baseLayersDiffer) {\n const changes = this.baseLayersDiffer.diff(this.baseLayersValue);\n const results = this.controlLayers.applyBaseLayerChanges(changes);\n\n if (results.changed()) {\n this.syncBaseLayer();\n }\n }\n\n }\n\n /**\n * Check the current base layer and change it to the new one if necessary\n */\n protected syncBaseLayer() {\n\n const map = this.leafletDirective.getMap();\n const layers = LeafletUtil.mapToArray(this.baseLayers);\n let foundLayer: Layer;\n\n // Search all the layers in the map to see if we can find them in the baselayer array\n map.eachLayer((l: Layer) => {\n foundLayer = layers.find((bl) => (l === bl));\n });\n\n // Did we find the layer?\n if (null != foundLayer) {\n // Yes - set the baselayer to the one we found\n this.baseLayer = foundLayer;\n }\n else {\n // No - set the baselayer to the first in the array and add it to the map\n if (layers.length > 0) {\n this.baseLayer = layers[0];\n\n // Add layers outside of angular to prevent events from triggering change detection\n this.zone.runOutsideAngular(() => {\n this.baseLayer.addTo(map);\n });\n }\n }\n\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { LeafletDirective } from './core/leaflet.directive';\nimport { LeafletLayerDirective } from './layers/leaflet-layer.directive';\nimport { LeafletLayersDirective } from './layers/leaflet-layers.directive';\nimport { LeafletLayersControlDirective } from './layers/control/leaflet-control-layers.directive';\nimport { LeafletBaseLayersDirective } from './layers/base/leaflet-baselayers.directive';\n\n@NgModule({\n imports: [\n LeafletDirective,\n LeafletLayerDirective,\n LeafletLayersDirective,\n LeafletLayersControlDirective,\n LeafletBaseLayersDirective\n ],\n exports: [\n LeafletDirective,\n LeafletLayerDirective,\n LeafletLayersDirective,\n LeafletLayersControlDirective,\n LeafletBaseLayersDirective\n ]\n})\nexport class LeafletModule {\n\n}\n","import { tileLayer, TileLayer, TileLayerOptions } from 'leaflet';\n\nexport class LeafletTileLayerDefinition {\n\n constructor(\n public type: string,\n public url: string,\n public options: TileLayerOptions) { }\n\n\n /**\n * Creates a TileLayer from the provided definition. This is a convenience function\n * to help with generating layers from objects.\n *\n * @param layerDef The layer to create\n * @returns {TileLayer} The TileLayer that has been created\n */\n static createTileLayer(layerDef: LeafletTileLayerDefinition): TileLayer {\n let layer: TileLayer;\n\n switch (layerDef.type) {\n case 'xyz':\n layer = tileLayer(layerDef.url, layerDef.options);\n break;\n case 'wms':\n default:\n layer = tileLayer.wms(layerDef.url, layerDef.options);\n break;\n }\n\n return layer;\n }\n\n /**\n * Creates a TileLayer for each key in the incoming map. This is a convenience function\n * for generating an associative array of layers from an associative array of objects\n *\n * @param layerDefs A map of key to tile layer definition\n * @returns {{[p: string]: TileLayer}} A new map of key to TileLayer\n */\n static createTileLayers(layerDefs: { [ key: string ]: LeafletTileLayerDefinition }): { [ key: string ]: TileLayer } {\n const layers: { [ key: string ]: TileLayer } = {};\n\n for (const k in layerDefs) {\n if (layerDefs.hasOwnProperty(k)) {\n layers[k] = (LeafletTileLayerDefinition.createTileLayer(layerDefs[k]));\n }\n }\n\n return layers;\n }\n\n /**\n * Create a Tile Layer from the current state of this object\n *\n * @returns {TileLayer} A new TileLayer\n */\n createTileLayer(): TileLayer {\n return LeafletTileLayerDefinition.createTileLayer(this);\n }\n}\n","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AAe,CAAC,QAAoC,EAAA;AACvD,QAAA,IAAI,KAAgB;AAEpB,QAAA,QAAQ,QAAQ,CAAC,IAAI;AACjB,YAAA,KAAK,KAAK;gBACN,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAG,QAAQ,CAAC,OAAO,CAAC;gBAClD;AACJ,YAAA,KAAK,KAAK;AACV,YAAA;AACI,gBAAA,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAG,QAAQ,CAAC,OAAO,CAAC;gBACtD;;AAGR,QAAA,OAAO,KAAK;IAChB;AAEA;;;;;;AAMG;IACH,OAAO,gBAAgB,CAAC,SAA0D,EAAA;QAC9E,MAAM,MAAM,GAAmC,EAAE;AAEjD,QAAA,KAAK,MAAM,CAAC,IAAI,SAAS,EAAE;AACvB,YAAA,IAAI,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;AAC7B,gBAAA,MAAM,CAAC,CAAC,CAAC,IAAI,0BAA0B,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1E;QACJ;AAEA,QAAA,OAAO,MAAM;IACjB;AAEA;;;;AAIG;IACH,eAAe,GAAA;AACX,QAAA,OAAO,0BAA0B,CAAC,eAAe,CAAC,IAAI,CAAC;IAC3D;AACH;;AC5DD;;AAEG;;;;"}
1
+ {"version":3,"file":"bluehalo-ngx-leaflet.mjs","sources":["../../../projects/ngx-leaflet/src/lib/core/leaflet.util.ts","../../../projects/ngx-leaflet/src/lib/core/leaflet.directive.ts","../../../projects/ngx-leaflet/src/lib/core/leaflet.directive.wrapper.ts","../../../projects/ngx-leaflet/src/lib/layers/leaflet-layer.directive.ts","../../../projects/ngx-leaflet/src/lib/layers/leaflet-layers.directive.ts","../../../projects/ngx-leaflet/src/lib/layers/control/leaflet-control-layers-changes.model.ts","../../../projects/ngx-leaflet/src/lib/layers/control/leaflet-control-layers.wrapper.ts","../../../projects/ngx-leaflet/src/lib/layers/control/leaflet-control-layers-config.model.ts","../../../projects/ngx-leaflet/src/lib/layers/control/leaflet-control-layers.directive.ts","../../../projects/ngx-leaflet/src/lib/layers/base/leaflet-baselayers.directive.ts","../../../projects/ngx-leaflet/src/lib/leaflet.module.ts","../../../projects/ngx-leaflet/src/lib/layers/leaflet-tile-layer-definition.model.ts","../../../projects/ngx-leaflet/src/bluehalo-ngx-leaflet.ts"],"sourcesContent":["import { EventEmitter, NgZone } from '@angular/core';\n\nexport class LeafletUtil {\n\n static mapToArray<T>(map: { [ key: string ]: T }): T[] {\n const toReturn: T[] = [];\n\n for (const k in map) {\n if (map.hasOwnProperty(k)) {\n toReturn.push(map[k]);\n }\n }\n\n return toReturn;\n }\n\n static handleEvent<T>(zone: NgZone, eventEmitter: EventEmitter<T>, event: T) {\n\n // Don't want to emit if there are no observers\n if (0 < eventEmitter.observers.length) {\n zone.run(() => {\n eventEmitter.emit(event);\n });\n }\n\n }\n}\n","import {\n Directive, ElementRef, EventEmitter, HostListener, Input, NgZone, OnChanges, OnDestroy, OnInit, Output,\n SimpleChange\n} from '@angular/core';\n\nimport { latLng, LatLng, LatLngBounds, LeafletEvent, LeafletMouseEvent, map, Map, MapOptions } from 'leaflet';\n\nimport { LeafletUtil } from './leaflet.util';\n\n@Directive({\n selector: '[leaflet]',\n})\nexport class LeafletDirective\n implements OnChanges, OnDestroy, OnInit {\n\n readonly DEFAULT_ZOOM = 1;\n readonly DEFAULT_CENTER = latLng(38.907192, -77.036871);\n readonly DEFAULT_FPZ_OPTIONS = {};\n\n resizeTimer: ReturnType<typeof setTimeout> | null;\n\n // Reference to the primary map object\n map: Map;\n\n @Input('leafletFitBoundsOptions') fitBoundsOptions = this.DEFAULT_FPZ_OPTIONS;\n @Input('leafletPanOptions') panOptions = this.DEFAULT_FPZ_OPTIONS;\n @Input('leafletZoomOptions') zoomOptions = this.DEFAULT_FPZ_OPTIONS;\n @Input('leafletZoomPanOptions') zoomPanOptions = this.DEFAULT_FPZ_OPTIONS;\n\n\n // Default configuration\n @Input('leafletOptions') options: MapOptions = {};\n\n // Configure callback function for the map\n @Output('leafletMapReady') mapReady = new EventEmitter<Map>();\n\n // Zoom level for the map\n @Input('leafletZoom') zoom: number;\n @Output('leafletZoomChange') zoomChange = new EventEmitter<number>();\n\n // Center of the map\n @Input('leafletCenter') center: LatLng;\n @Output('leafletCenterChange') centerChange = new EventEmitter<LatLng>();\n\n // Set fit bounds for map\n @Input('leafletFitBounds') fitBounds: LatLngBounds;\n\n // Set the max bounds for the map\n @Input('leafletMaxBounds') maxBounds: LatLngBounds;\n\n // Set the min zoom for the map\n @Input('leafletMinZoom') minZoom: number;\n\n // Set the max zoom for the map\n @Input('leafletMaxZoom') maxZoom: number;\n\n\n // Mouse Map Events\n @Output('leafletClick') onClick = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletDoubleClick') onDoubleClick = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletMouseDown') onMouseDown = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletMouseUp') onMouseUp = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletMouseMove') onMouseMove = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletMouseOver') onMouseOver = new EventEmitter<LeafletMouseEvent>();\n @Output('leafletMouseOut') onMouseOut = new EventEmitter<LeafletMouseEvent>();\n\n // Map Move Events\n @Output('leafletMapMove') onMapMove = new EventEmitter<LeafletEvent>();\n @Output('leafletMapMoveStart') onMapMoveStart = new EventEmitter<LeafletEvent>();\n @Output('leafletMapMoveEnd') onMapMoveEnd = new EventEmitter<LeafletEvent>();\n\n // Map Zoom Events\n @Output('leafletMapZoom') onMapZoom = new EventEmitter<LeafletEvent>();\n @Output('leafletMapZoomStart') onMapZoomStart = new EventEmitter<LeafletEvent>();\n @Output('leafletMapZoomEnd') onMapZoomEnd = new EventEmitter<LeafletEvent>();\n\n constructor(private element: ElementRef, private zone: NgZone) {\n // Nothing here\n }\n\n ngOnInit() {\n\n // Create the map outside of angular so the various map events don't trigger change detection\n this.zone.runOutsideAngular(() => {\n\n // Create the map with some reasonable defaults\n this.map = map(this.element.nativeElement, this.options);\n this.addMapEventListeners();\n\n });\n\n // Only setView if there is a center/zoom\n if (null != this.center && null != this.zoom) {\n this.setView(this.center, this.zoom);\n }\n\n // Set up all the initial settings\n if (null != this.fitBounds) {\n this.setFitBounds(this.fitBounds);\n }\n\n if (null != this.maxBounds) {\n this.setMaxBounds(this.maxBounds);\n }\n\n if (null != this.minZoom) {\n this.setMinZoom(this.minZoom);\n }\n\n if (null != this.maxZoom) {\n this.setMaxZoom(this.maxZoom);\n }\n\n this.doResize();\n\n // Fire map ready event\n this.mapReady.emit(this.map);\n\n }\n\n ngOnChanges(changes: { [key: string]: SimpleChange }) {\n\n /*\n * The following code is to address an issue with our (basic) implementation of\n * zooming and panning. From our testing, it seems that a pan operation followed\n * by a zoom operation in the same thread will interfere with each other. The zoom\n * operation interrupts/cancels the pan, resulting in a final center point that is\n * inaccurate. The solution seems to be to either separate them with a timeout or\n * to collapse them into a setView call.\n */\n\n // Zooming and Panning\n if (changes['zoom'] && changes['center'] && null != this.zoom && null != this.center) {\n this.setView(changes['center'].currentValue, changes['zoom'].currentValue);\n }\n // Set the zoom level\n else if (changes['zoom']) {\n this.setZoom(changes['zoom'].currentValue);\n }\n // Set the map center\n else if (changes['center']) {\n this.setCenter(changes['center'].currentValue);\n }\n\n // Other options\n if (changes['fitBounds']) {\n this.setFitBounds(changes['fitBounds'].currentValue);\n }\n\n if (changes['maxBounds']) {\n this.setMaxBounds(changes['maxBounds'].currentValue);\n }\n\n if (changes['minZoom']) {\n this.setMinZoom(changes['minZoom'].currentValue);\n }\n\n if (changes['maxZoom']) {\n this.setMaxZoom(changes['maxZoom'].currentValue);\n }\n\n }\n\n ngOnDestroy() {\n // If this directive is destroyed, the map is too\n if (null != this.map) {\n this.map.off();\n this.map.remove();\n }\n }\n\n public getMap() {\n return this.map;\n }\n\n\n @HostListener('window:resize', [])\n onResize() {\n this.delayResize();\n }\n\n private addMapEventListeners() {\n\n const registerEventHandler = (eventName: string, handler: (e: LeafletEvent) => void) => {\n this.map.on(eventName, handler);\n };\n\n\n // Add all the pass-through mouse event handlers\n registerEventHandler('click', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onClick, e));\n registerEventHandler('dblclick', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onDoubleClick, e));\n registerEventHandler('mousedown', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseDown, e));\n registerEventHandler('mouseup', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseUp, e));\n registerEventHandler('mouseover', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseOver, e));\n registerEventHandler('mouseout', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseOut, e));\n registerEventHandler('mousemove', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseMove, e));\n\n registerEventHandler('zoomstart', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapZoomStart, e));\n registerEventHandler('zoom', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapZoom, e));\n registerEventHandler('zoomend', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapZoomEnd, e));\n registerEventHandler('movestart', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapMoveStart, e));\n registerEventHandler('move', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapMove, e));\n registerEventHandler('moveend', (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onMapMoveEnd, e));\n\n\n // Update any things for which we provide output bindings\n const outputUpdateHandler = () => {\n const zoom = this.map.getZoom();\n if (zoom !== this.zoom) {\n this.zoom = zoom;\n LeafletUtil.handleEvent(this.zone, this.zoomChange, zoom);\n }\n\n const center = this.map.getCenter();\n if (null != center || null != this.center) {\n\n if (((null == center || null == this.center) && center !== this.center)\n || (center.lat !== this.center.lat || center.lng !== this.center.lng)) {\n\n this.center = center;\n LeafletUtil.handleEvent(this.zone, this.centerChange, center);\n\n }\n }\n };\n\n registerEventHandler('moveend', outputUpdateHandler);\n registerEventHandler('zoomend', outputUpdateHandler);\n }\n\n /**\n * Resize the map to fit it's parent container\n */\n private doResize() {\n\n // Run this outside of angular so the map events stay outside of angular\n this.zone.runOutsideAngular(() => {\n\n // Invalidate the map size to trigger it to update itself\n if (null != this.map) {\n this.map.invalidateSize({});\n }\n\n });\n\n }\n\n /**\n * Manage a delayed resize of the component\n */\n private delayResize() {\n if (null != this.resizeTimer) {\n clearTimeout(this.resizeTimer);\n }\n this.resizeTimer = setTimeout(this.doResize.bind(this), 200);\n }\n\n\n /**\n * Set the view (center/zoom) all at once\n * @param center The new center\n * @param zoom The new zoom level\n */\n private setView(center: LatLng, zoom: number) {\n\n if (null != this.map && null != center && null != zoom) {\n this.map.setView(center, zoom, this.zoomPanOptions);\n }\n\n }\n\n /**\n * Set the map zoom level\n * @param zoom the new zoom level for the map\n */\n private setZoom(zoom: number) {\n\n if (null != this.map && null != zoom) {\n this.map.setZoom(zoom, this.zoomOptions);\n }\n\n }\n\n /**\n * Set the center of the map\n * @param center the center point\n */\n private setCenter(center: LatLng) {\n\n if (null != this.map && null != center) {\n this.map.panTo(center, this.panOptions);\n }\n\n }\n\n /**\n * Fit the map to the bounds\n * @param latLngBounds the boundary to set\n */\n private setFitBounds(latLngBounds: LatLngBounds) {\n\n if (null != this.map && null != latLngBounds) {\n this.map.fitBounds(latLngBounds, this.fitBoundsOptions);\n }\n\n }\n\n /**\n * Set the map's max bounds\n * @param latLngBounds the boundary to set\n */\n private setMaxBounds(latLngBounds: LatLngBounds) {\n\n if (null != this.map && null != latLngBounds) {\n this.map.setMaxBounds(latLngBounds);\n }\n\n }\n\n /**\n * Set the map's min zoom\n * @param number the new min zoom\n */\n private setMinZoom(zoom: number) {\n\n if (null != this.map && null != zoom) {\n this.map.setMinZoom(zoom);\n }\n\n }\n\n /**\n * Set the map's min zoom\n * @param number the new min zoom\n */\n private setMaxZoom(zoom: number) {\n\n if (null != this.map && null != zoom) {\n this.map.setMaxZoom(zoom);\n }\n\n }\n\n}\n","import { LeafletDirective } from './leaflet.directive';\n\nimport { Map } from 'leaflet';\n\nexport class LeafletDirectiveWrapper {\n\n // Reference to the main leaflet directive\n protected leafletDirective: LeafletDirective;\n\n constructor(leafletDirective: LeafletDirective) {\n this.leafletDirective = leafletDirective;\n }\n\n init() {\n // Nothing for now\n }\n\n getMap(): Map {\n return this.leafletDirective.getMap();\n }\n\n}\n","import {\n Directive, EventEmitter, Input, NgZone, OnChanges, OnDestroy, OnInit, Output,\n SimpleChange\n} from '@angular/core';\n\nimport { Layer, LeafletEvent } from 'leaflet';\n\nimport { LeafletDirective } from '../core/leaflet.directive';\nimport { LeafletDirectiveWrapper } from '../core/leaflet.directive.wrapper';\nimport { LeafletUtil } from '../core/leaflet.util';\n\n\n/**\n * Layer directive\n *\n * This directive is used to directly control a single map layer. The purpose of this directive is to\n * be used as part of a child structural directive of the map element.\n *\n */\n@Directive({\n selector: '[leafletLayer]',\n})\nexport class LeafletLayerDirective\n implements OnChanges, OnDestroy, OnInit {\n\n @Input('leafletLayer') layer: Layer;\n\n // Layer Events\n @Output('leafletLayerAdd') onAdd = new EventEmitter<LeafletEvent>();\n @Output('leafletLayerRemove') onRemove = new EventEmitter<LeafletEvent>();\n\n // Layer Event handlers\n private onAddLayerHandler: (event: LeafletEvent) => void;\n private onRemoveLayerHandler: (event: LeafletEvent) => void;\n\n // Wrapper for the leaflet directive (manages the parent directive)\n private leafletDirective: LeafletDirectiveWrapper;\n\n constructor(leafletDirective: LeafletDirective, private zone: NgZone) {\n this.leafletDirective = new LeafletDirectiveWrapper(leafletDirective);\n }\n\n ngOnInit() {\n\n // Init the map\n this.leafletDirective.init();\n\n }\n\n ngOnDestroy() {\n\n if (null != this.layer) {\n\n // Unregister the event handlers\n this.removeLayerEventListeners(this.layer);\n\n // Remove the layer from the map\n this.layer.remove();\n }\n\n }\n\n ngOnChanges(changes: { [key: string]: SimpleChange }) {\n\n if (changes['layer']) {\n\n // Update the layer\n const p: Layer = changes['layer'].previousValue;\n const n = changes['layer'].currentValue;\n\n this.zone.runOutsideAngular(() => {\n if (null != p) {\n this.removeLayerEventListeners(p);\n p.remove();\n }\n if (null != n) {\n this.addLayerEventListeners(n);\n this.leafletDirective.getMap().addLayer(n);\n }\n });\n\n }\n\n }\n\n private addLayerEventListeners(l: Layer) {\n\n this.onAddLayerHandler = (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onAdd, e);\n l.on('add', this.onAddLayerHandler);\n\n this.onRemoveLayerHandler = (e: LeafletEvent) => LeafletUtil.handleEvent(this.zone, this.onRemove, e);\n l.on('remove', this.onRemoveLayerHandler);\n\n }\n\n private removeLayerEventListeners(l: Layer) {\n\n l.off('add', this.onAddLayerHandler);\n l.off('remove', this.onRemoveLayerHandler);\n\n }\n\n}\n","import { Directive, DoCheck, Input, IterableDiffer, IterableDiffers, NgZone, OnDestroy, OnInit } from '@angular/core';\n\nimport { Layer} from 'leaflet';\n\nimport { LeafletDirective } from '../core/leaflet.directive';\nimport { LeafletDirectiveWrapper } from '../core/leaflet.directive.wrapper';\n\n\n/**\n * Layers directive\n *\n * This directive is used to directly control map layers. As changes are made to the input array of\n * layers, the map is synched to the array. As layers are added or removed from the input array, they\n * are also added or removed from the map. The input array is treated as immutable. To detect changes,\n * you must change the array instance.\n *\n * Important Note: The input layers array is assumed to be immutable. This means you need to use an\n * immutable array implementation or create a new copy of your array when you make changes, otherwise\n * this directive won't detect the change. This is by design. It's for performance reasons. Change\n * detection of mutable arrays requires diffing the state of the array on every DoCheck cycle, which\n * is extremely expensive from a time complexity perspective.\n *\n */\n@Directive({\n selector: '[leafletLayers]',\n})\nexport class LeafletLayersDirective\n implements DoCheck, OnDestroy, OnInit {\n\n // Array of configured layers\n layersValue: Layer[];\n\n // Differ to do change detection on the array\n layersDiffer: IterableDiffer<Layer>;\n\n // Set/get the layers\n @Input('leafletLayers')\n set layers(v: Layer[]) {\n this.layersValue = v;\n\n // Now that we have a differ, do an immediate layer update\n this.updateLayers();\n }\n get layers(): Layer[] {\n return this.layersValue;\n }\n\n // Wrapper for the leaflet directive (manages the parent directive)\n private leafletDirective: LeafletDirectiveWrapper;\n\n constructor(leafletDirective: LeafletDirective, private differs: IterableDiffers, private zone: NgZone) {\n this.leafletDirective = new LeafletDirectiveWrapper(leafletDirective);\n this.layersDiffer = this.differs.find([]).create<Layer>();\n }\n\n ngDoCheck() {\n this.updateLayers();\n }\n\n ngOnInit() {\n\n // Init the map\n this.leafletDirective.init();\n\n // Update layers once the map is ready\n this.updateLayers();\n\n }\n\n ngOnDestroy() {\n this.layers = [];\n }\n\n /**\n * Update the state of the layers.\n * We use an iterable differ to synchronize the map layers with the state of the bound layers array.\n * This is important because it allows us to react to changes to the contents of the array as well\n * as changes to the actual array instance.\n */\n private updateLayers() {\n\n const map = this.leafletDirective.getMap();\n\n if (null != map && null != this.layersDiffer) {\n\n const changes = this.layersDiffer.diff(this.layersValue);\n if (null != changes) {\n\n // Run outside angular to ensure layer events don't trigger change detection\n this.zone.runOutsideAngular(() => {\n\n changes.forEachRemovedItem((c) => {\n map.removeLayer(c.item);\n });\n changes.forEachAddedItem((c) => {\n map.addLayer(c.item);\n });\n\n });\n\n }\n\n }\n\n }\n\n}\n","export class LeafletControlLayersChanges {\n layersRemoved: number = 0;\n layersChanged: number = 0;\n layersAdded: number = 0;\n\n changed(): boolean {\n return !(this.layersRemoved === 0 && this.layersChanged === 0 && this.layersAdded === 0);\n }\n}\n","import { EventEmitter, KeyValueChanges, NgZone } from '@angular/core';\n\nimport { control, Control, Layer } from 'leaflet';\n\nimport { LeafletControlLayersChanges } from './leaflet-control-layers-changes.model';\n\nexport class LeafletControlLayersWrapper {\n\n // The layers control object\n protected layersControl: Control.Layers;\n\n // Event Emitter for when the control is ready\n protected layersControlReady: EventEmitter<Control.Layers>;\n\n constructor(private zone: NgZone, layersControlReady: EventEmitter<Control.Layers>) {\n this.layersControlReady = layersControlReady;\n }\n\n getLayersControl() {\n return this.layersControl;\n }\n\n init(controlConfig: { baseLayers?: { [name: string]: Layer }, overlays?: { [name: string]: Layer } }, controlOptions: Control.LayersOptions): Control.Layers {\n\n const baseLayers = controlConfig.baseLayers || {};\n const overlays = controlConfig.overlays || {};\n\n // Create the control outside of angular to ensure events don't trigger change detection\n this.zone.runOutsideAngular(() => {\n this.layersControl = control.layers(baseLayers, overlays, controlOptions);\n });\n\n\n this.layersControlReady.emit(this.layersControl);\n\n return this.layersControl;\n }\n\n applyBaseLayerChanges(changes: KeyValueChanges<string, Layer>): LeafletControlLayersChanges {\n let results: LeafletControlLayersChanges = new LeafletControlLayersChanges();\n\n if (null != this.layersControl) {\n results = this.applyChanges(changes, this.layersControl.addBaseLayer);\n }\n\n return results;\n }\n\n applyOverlayChanges(changes: KeyValueChanges<string, Layer>): LeafletControlLayersChanges {\n let results: LeafletControlLayersChanges = new LeafletControlLayersChanges();\n\n if (null != this.layersControl) {\n results = this.applyChanges(changes, this.layersControl.addOverlay);\n }\n\n return results;\n }\n\n private applyChanges(changes: KeyValueChanges<string, Layer>, addFn: (layer: Layer, name: string) => void): LeafletControlLayersChanges {\n const results: LeafletControlLayersChanges = new LeafletControlLayersChanges();\n\n if (null != changes) {\n\n // All layer management is outside angular to avoid layer events from triggering change detection\n this.zone.runOutsideAngular(() => {\n\n changes.forEachChangedItem((c) => {\n this.layersControl.removeLayer(c.previousValue);\n addFn.call(this.layersControl, c.currentValue, c.key);\n results.layersChanged++;\n });\n changes.forEachRemovedItem((c) => {\n this.layersControl.removeLayer(c.previousValue);\n results.layersRemoved++;\n });\n changes.forEachAddedItem((c) => {\n addFn.call(this.layersControl, c.currentValue, c.key);\n results.layersAdded++;\n });\n\n });\n\n }\n\n return results;\n }\n\n}\n","import { Layer } from 'leaflet';\n\nexport class LeafletControlLayersConfig {\n baseLayers: { [name: string]: Layer } = {};\n overlays: { [name: string]: Layer } = {};\n}\n","import {\n Directive, DoCheck, EventEmitter, Input, KeyValueDiffer, KeyValueDiffers, NgZone, OnDestroy, OnInit,\n Output\n} from '@angular/core';\n\nimport { Control, Layer, LayersControlEvent } from 'leaflet';\n\nimport { LeafletDirective } from '../../core/leaflet.directive';\nimport { LeafletDirectiveWrapper } from '../../core/leaflet.directive.wrapper';\nimport { LeafletUtil } from '../../core/leaflet.util';\nimport { LeafletControlLayersWrapper } from './leaflet-control-layers.wrapper';\nimport { LeafletControlLayersConfig } from './leaflet-control-layers-config.model';\n\n\n/**\n * Layers Control\n *\n * This directive is used to configure the layers control. The input accepts an object with two\n * key-value maps of layer name -> layer. Mutable changes are detected. On changes, a differ is\n * used to determine what changed so that layers are appropriately added or removed.\n *\n * To specify which layer to show as the 'active' baselayer, you will want to add it to the map\n * using the layers directive. Otherwise, the last one it sees will be used.\n */\n@Directive({\n selector: '[leafletLayersControl]',\n})\nexport class LeafletLayersControlDirective\n implements DoCheck, OnDestroy, OnInit {\n\n // Control Layers Configuration\n layersControlConfigValue: LeafletControlLayersConfig;\n\n baseLayersDiffer: KeyValueDiffer<string, Layer>;\n overlaysDiffer: KeyValueDiffer<string, Layer>;\n\n @Input('leafletLayersControl')\n set layersControlConfig(v: LeafletControlLayersConfig) {\n\n // Validation/init stuff\n if (null == v) { v = new LeafletControlLayersConfig(); }\n if (null == v.baseLayers) { v.baseLayers = {}; }\n if (null == v.overlays) { v.overlays = {}; }\n\n // Store the value\n this.layersControlConfigValue = v;\n\n // Update the map\n this.updateLayers();\n\n }\n get layersControlConfig(): LeafletControlLayersConfig {\n return this.layersControlConfigValue;\n }\n\n @Input('leafletLayersControlOptions') layersControlOptions: Control.LayersOptions;\n\n @Output('leafletLayersControlReady') layersControlReady = new EventEmitter<Control.Layers>();\n\n // Overlay events — fired by the map when a user checks/unchecks an overlay in the layers control\n @Output('leafletOverlayAdd') onOverlayAdd = new EventEmitter<LayersControlEvent>();\n @Output('leafletOverlayRemove') onOverlayRemove = new EventEmitter<LayersControlEvent>();\n\n private controlLayers: LeafletControlLayersWrapper;\n private leafletDirective: LeafletDirectiveWrapper;\n\n // Store handler refs for explicit cleanup in ngOnDestroy\n private overlayAddHandler: (e: LayersControlEvent) => void;\n private overlayRemoveHandler: (e: LayersControlEvent) => void;\n\n constructor(leafletDirective: LeafletDirective, private differs: KeyValueDiffers, private zone: NgZone) {\n this.leafletDirective = new LeafletDirectiveWrapper(leafletDirective);\n this.controlLayers = new LeafletControlLayersWrapper(this.zone, this.layersControlReady);\n\n // Generate differs\n this.baseLayersDiffer = this.differs.find({}).create<string, Layer>();\n this.overlaysDiffer = this.differs.find({}).create<string, Layer>();\n\n }\n\n ngOnInit() {\n\n // Init the map\n this.leafletDirective.init();\n\n // Set up control outside of angular to avoid change detection when using the control\n this.zone.runOutsideAngular(() => {\n\n // Set up all the initial settings\n this.controlLayers\n .init({}, this.layersControlOptions)\n .addTo(this.leafletDirective.getMap());\n\n // Register overlay event pass-throughs\n const map = this.leafletDirective.getMap();\n this.overlayAddHandler = (e: LayersControlEvent) => LeafletUtil.handleEvent(this.zone, this.onOverlayAdd, e);\n this.overlayRemoveHandler = (e: LayersControlEvent) => LeafletUtil.handleEvent(this.zone, this.onOverlayRemove, e);\n map.on('overlayadd', this.overlayAddHandler);\n map.on('overlayremove', this.overlayRemoveHandler);\n\n });\n\n this.updateLayers();\n\n }\n\n ngOnDestroy() {\n const map = this.leafletDirective.getMap();\n if (null != map) {\n map.off('overlayadd', this.overlayAddHandler);\n map.off('overlayremove', this.overlayRemoveHandler);\n }\n this.layersControlConfig = { baseLayers: {}, overlays: {} };\n this.controlLayers.getLayersControl().remove();\n }\n\n ngDoCheck() {\n this.updateLayers();\n }\n\n protected updateLayers() {\n\n const map = this.leafletDirective.getMap();\n const layersControl = this.controlLayers.getLayersControl();\n\n if (null != map && null != layersControl) {\n\n // Run the baselayers differ\n if (null != this.baseLayersDiffer && null != this.layersControlConfigValue.baseLayers) {\n const changes = this.baseLayersDiffer.diff(this.layersControlConfigValue.baseLayers);\n this.controlLayers.applyBaseLayerChanges(changes);\n }\n\n // Run the overlays differ\n if (null != this.overlaysDiffer && null != this.layersControlConfigValue.overlays) {\n const changes = this.overlaysDiffer.diff(this.layersControlConfigValue.overlays);\n this.controlLayers.applyOverlayChanges(changes);\n }\n\n }\n\n }\n\n}\n","import {\n Directive, DoCheck, EventEmitter, Input, KeyValueDiffer, KeyValueDiffers, NgZone, OnDestroy,\n OnInit, Output\n} from '@angular/core';\n\nimport { Control, Layer } from 'leaflet';\n\nimport { LeafletUtil } from '../../core/leaflet.util';\nimport { LeafletDirective } from '../../core/leaflet.directive';\nimport { LeafletDirectiveWrapper } from '../../core/leaflet.directive.wrapper';\nimport { LeafletControlLayersWrapper } from '../control/leaflet-control-layers.wrapper';\n\n\n/**\n * Baselayers directive\n *\n * This directive is provided as a convenient way to add baselayers to the map. The input accepts\n * a key-value map of layer name -> layer. Mutable changed are detected. On changes, a differ is\n * used to determine what changed so that layers are appropriately added or removed. This directive\n * will also add the layers control so users can switch between available base layers.\n *\n * To specify which layer to show as the 'active' baselayer, you will want to add it to the map\n * using the layers directive. Otherwise, the plugin will use the last one it sees.\n */\n@Directive({\n selector: '[leafletBaseLayers]',\n})\nexport class LeafletBaseLayersDirective\n implements DoCheck, OnDestroy, OnInit {\n\n // Base Layers\n baseLayersValue: { [name: string]: Layer };\n\n // Base Layers Map Differ\n baseLayersDiffer: KeyValueDiffer<string, Layer>;\n\n // Set/get baseLayers\n @Input('leafletBaseLayers')\n set baseLayers(v: { [name: string]: Layer }) {\n this.baseLayersValue = v;\n\n this.updateBaseLayers();\n }\n get baseLayers(): { [name: string]: Layer } {\n return this.baseLayersValue;\n }\n\n // Control Options\n @Input('leafletLayersControlOptions') layersControlOptions: Control.LayersOptions;\n\n // Output for once the layers control is ready\n @Output('leafletLayersControlReady') layersControlReady = new EventEmitter<Control.Layers>();\n\n // Active Base Layer\n private baseLayer: Layer;\n\n // Track whether the map has been removed, to avoid redundant cleanup on destroy\n private mapUnloaded = false;\n\n private leafletDirective: LeafletDirectiveWrapper;\n private controlLayers: LeafletControlLayersWrapper;\n\n constructor(leafletDirective: LeafletDirective, private differs: KeyValueDiffers, private zone: NgZone) {\n this.leafletDirective = new LeafletDirectiveWrapper(leafletDirective);\n this.controlLayers = new LeafletControlLayersWrapper(this.zone, this.layersControlReady);\n this.baseLayersDiffer = this.differs.find({}).create<string, Layer>();\n }\n\n ngOnDestroy() {\n // Only clean up layer listeners from the control if the map is still alive.\n // If the map was already removed (mapUnloaded=true), its teardown already cleared\n // those listeners — calling removeLayer() again would produce \"listener not found\" warnings.\n if (!this.mapUnloaded) {\n this.baseLayers = {};\n }\n if (null != this.controlLayers.getLayersControl()) {\n this.controlLayers.getLayersControl().remove();\n }\n }\n\n ngOnInit() {\n\n // Init the map\n this.leafletDirective.init();\n\n // Create the control outside angular to prevent events from triggering change detection\n this.zone.runOutsideAngular(() => {\n\n // Initially configure the controlLayers\n this.controlLayers\n .init({}, this.layersControlOptions)\n .addTo(this.leafletDirective.getMap());\n\n // Track map removal so ngOnDestroy can skip redundant layer cleanup\n this.leafletDirective.getMap().on('unload', () => { this.mapUnloaded = true; });\n\n });\n\n this.updateBaseLayers();\n\n }\n\n ngDoCheck() {\n this.updateBaseLayers();\n }\n\n protected updateBaseLayers() {\n\n const map = this.leafletDirective.getMap();\n const layersControl = this.controlLayers.getLayersControl();\n\n if (null != map && null != layersControl && null != this.baseLayersDiffer) {\n const changes = this.baseLayersDiffer.diff(this.baseLayersValue);\n const results = this.controlLayers.applyBaseLayerChanges(changes);\n\n if (results.changed()) {\n this.syncBaseLayer();\n }\n }\n\n }\n\n /**\n * Check the current base layer and change it to the new one if necessary\n */\n protected syncBaseLayer() {\n\n const map = this.leafletDirective.getMap();\n const layers = LeafletUtil.mapToArray(this.baseLayers);\n let foundLayer: Layer;\n\n // Search all the layers in the map to see if we can find them in the baselayer array\n map.eachLayer((l: Layer) => {\n foundLayer = layers.find((bl) => (l === bl));\n });\n\n // Did we find the layer?\n if (null != foundLayer) {\n // Yes - set the baselayer to the one we found\n this.baseLayer = foundLayer;\n }\n else {\n // No - set the baselayer to the first in the array and add it to the map\n if (layers.length > 0) {\n this.baseLayer = layers[0];\n\n // Add layers outside of angular to prevent events from triggering change detection\n this.zone.runOutsideAngular(() => {\n this.baseLayer.addTo(map);\n });\n }\n }\n\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { LeafletDirective } from './core/leaflet.directive';\nimport { LeafletLayerDirective } from './layers/leaflet-layer.directive';\nimport { LeafletLayersDirective } from './layers/leaflet-layers.directive';\nimport { LeafletLayersControlDirective } from './layers/control/leaflet-control-layers.directive';\nimport { LeafletBaseLayersDirective } from './layers/base/leaflet-baselayers.directive';\n\n@NgModule({\n imports: [\n LeafletDirective,\n LeafletLayerDirective,\n LeafletLayersDirective,\n LeafletLayersControlDirective,\n LeafletBaseLayersDirective\n ],\n exports: [\n LeafletDirective,\n LeafletLayerDirective,\n LeafletLayersDirective,\n LeafletLayersControlDirective,\n LeafletBaseLayersDirective\n ]\n})\nexport class LeafletModule {\n\n}\n","import { tileLayer, TileLayer, TileLayerOptions } from 'leaflet';\n\nexport class LeafletTileLayerDefinition {\n\n constructor(\n public type: string,\n public url: string,\n public options: TileLayerOptions) { }\n\n\n /**\n * Creates a TileLayer from the provided definition. This is a convenience function\n * to help with generating layers from objects.\n *\n * @param layerDef The layer to create\n * @returns {TileLayer} The TileLayer that has been created\n */\n static createTileLayer(layerDef: LeafletTileLayerDefinition): TileLayer {\n let layer: TileLayer;\n\n switch (layerDef.type) {\n case 'xyz':\n layer = tileLayer(layerDef.url, layerDef.options);\n break;\n case 'wms':\n default:\n layer = tileLayer.wms(layerDef.url, layerDef.options);\n break;\n }\n\n return layer;\n }\n\n /**\n * Creates a TileLayer for each key in the incoming map. This is a convenience function\n * for generating an associative array of layers from an associative array of objects\n *\n * @param layerDefs A map of key to tile layer definition\n * @returns {{[p: string]: TileLayer}} A new map of key to TileLayer\n */\n static createTileLayers(layerDefs: { [ key: string ]: LeafletTileLayerDefinition }): { [ key: string ]: TileLayer } {\n const layers: { [ key: string ]: TileLayer } = {};\n\n for (const k in layerDefs) {\n if (layerDefs.hasOwnProperty(k)) {\n layers[k] = (LeafletTileLayerDefinition.createTileLayer(layerDefs[k]));\n }\n }\n\n return layers;\n }\n\n /**\n * Create a Tile Layer from the current state of this object\n *\n * @returns {TileLayer} A new TileLayer\n */\n createTileLayer(): TileLayer {\n return LeafletTileLayerDefinition.createTileLayer(this);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.LeafletDirective"],"mappings":";;;;MAEa,WAAW,CAAA;IAEpB,OAAO,UAAU,CAAI,GAA2B,EAAA;QAC5C,MAAM,QAAQ,GAAQ,EAAE;AAExB,QAAA,KAAK,MAAM,CAAC,IAAI,GAAG,EAAE;AACjB,YAAA,IAAI,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;gBACvB,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACzB;QACJ;AAEA,QAAA,OAAO,QAAQ;IACnB;AAEA,IAAA,OAAO,WAAW,CAAI,IAAY,EAAE,YAA6B,EAAE,KAAQ,EAAA;;QAGvE,IAAI,CAAC,GAAG,YAAY,CAAC,SAAS,CAAC,MAAM,EAAE;AACnC,YAAA,IAAI,CAAC,GAAG,CAAC,MAAK;AACV,gBAAA,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;AAC5B,YAAA,CAAC,CAAC;QACN;IAEJ;AACH;;MCdY,gBAAgB,CAAA;IAgEzB,WAAA,CAAoB,OAAmB,EAAU,IAAY,EAAA;QAAzC,IAAA,CAAA,OAAO,GAAP,OAAO;QAAsB,IAAA,CAAA,IAAI,GAAJ,IAAI;QA7D5C,IAAA,CAAA,YAAY,GAAG,CAAC;QAChB,IAAA,CAAA,cAAc,GAAG,MAAM,C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luehalo/ngx-leaflet",
3
3
  "description": "Angular.io components for Leaflet",
4
- "version": "21.1.0",
4
+ "version": "21.2.0",
5
5
  "author": "BlueHalo, LLC",
6
6
  "copyright": "Copyright BlueHalo 2007-2025 - All Rights Reserved.",
7
7
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { OnChanges, OnDestroy, OnInit, EventEmitter, ElementRef, NgZone, SimpleChange, DoCheck, IterableDiffer, IterableDiffers, KeyValueDiffer, KeyValueDiffers, KeyValueChanges } from '@angular/core';
3
- import { LatLng, Map, MapOptions, LatLngBounds, LeafletMouseEvent, LeafletEvent, Layer, Control, TileLayerOptions, TileLayer } from 'leaflet';
3
+ import { LatLng, Map, MapOptions, LatLngBounds, LeafletMouseEvent, LeafletEvent, Layer, Control, LayersControlEvent, TileLayerOptions, TileLayer } from 'leaflet';
4
4
 
5
5
  declare class LeafletDirective implements OnChanges, OnDestroy, OnInit {
6
6
  private element;
@@ -188,15 +188,19 @@ declare class LeafletLayersControlDirective implements DoCheck, OnDestroy, OnIni
188
188
  get layersControlConfig(): LeafletControlLayersConfig;
189
189
  layersControlOptions: Control.LayersOptions;
190
190
  layersControlReady: EventEmitter<Control.Layers>;
191
+ onOverlayAdd: EventEmitter<LayersControlEvent>;
192
+ onOverlayRemove: EventEmitter<LayersControlEvent>;
191
193
  private controlLayers;
192
194
  private leafletDirective;
195
+ private overlayAddHandler;
196
+ private overlayRemoveHandler;
193
197
  constructor(leafletDirective: LeafletDirective, differs: KeyValueDiffers, zone: NgZone);
194
198
  ngOnInit(): void;
195
199
  ngOnDestroy(): void;
196
200
  ngDoCheck(): void;
197
201
  protected updateLayers(): void;
198
202
  static ɵfac: i0.ɵɵFactoryDeclaration<LeafletLayersControlDirective, never>;
199
- static ɵdir: i0.ɵɵDirectiveDeclaration<LeafletLayersControlDirective, "[leafletLayersControl]", never, { "layersControlConfig": { "alias": "leafletLayersControl"; "required": false; }; "layersControlOptions": { "alias": "leafletLayersControlOptions"; "required": false; }; }, { "layersControlReady": "leafletLayersControlReady"; }, never, never, true, never>;
203
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LeafletLayersControlDirective, "[leafletLayersControl]", never, { "layersControlConfig": { "alias": "leafletLayersControl"; "required": false; }; "layersControlOptions": { "alias": "leafletLayersControlOptions"; "required": false; }; }, { "layersControlReady": "leafletLayersControlReady"; "onOverlayAdd": "leafletOverlayAdd"; "onOverlayRemove": "leafletOverlayRemove"; }, never, never, true, never>;
200
204
  }
201
205
 
202
206
  /**
@@ -226,6 +230,7 @@ declare class LeafletBaseLayersDirective implements DoCheck, OnDestroy, OnInit {
226
230
  layersControlOptions: Control.LayersOptions;
227
231
  layersControlReady: EventEmitter<Control.Layers>;
228
232
  private baseLayer;
233
+ private mapUnloaded;
229
234
  private leafletDirective;
230
235
  private controlLayers;
231
236
  constructor(leafletDirective: LeafletDirective, differs: KeyValueDiffers, zone: NgZone);