UNPKG

2.03 kBTypeScriptView Raw
1import { DoCheck, EventEmitter, KeyValueDiffer, KeyValueDiffers, NgZone, OnDestroy, OnInit } from '@angular/core';
2import { Control, Layer } from 'leaflet';
3import { LeafletDirective } from '../../core/leaflet.directive';
4import { LeafletControlLayersConfig } from './leaflet-control-layers-config.model';
5import * as i0 from "@angular/core";
6/**
7 * Layers Control
8 *
9 * This directive is used to configure the layers control. The input accepts an object with two
10 * key-value maps of layer name -> layer. Mutable changes are detected. On changes, a differ is
11 * used to determine what changed so that layers are appropriately added or removed.
12 *
13 * To specify which layer to show as the 'active' baselayer, you will want to add it to the map
14 * using the layers directive. Otherwise, the last one it sees will be used.
15 */
16export declare class LeafletLayersControlDirective implements DoCheck, OnDestroy, OnInit {
17 private differs;
18 private zone;
19 layersControlConfigValue: LeafletControlLayersConfig;
20 baseLayersDiffer: KeyValueDiffer<string, Layer>;
21 overlaysDiffer: KeyValueDiffer<string, Layer>;
22 set layersControlConfig(v: LeafletControlLayersConfig);
23 get layersControlConfig(): LeafletControlLayersConfig;
24 layersControlOptions: any;
25 layersControlReady: EventEmitter<Control.Layers>;
26 private controlLayers;
27 private leafletDirective;
28 constructor(leafletDirective: LeafletDirective, differs: KeyValueDiffers, zone: NgZone);
29 ngOnInit(): void;
30 ngOnDestroy(): void;
31 ngDoCheck(): void;
32 protected updateLayers(): void;
33 static ɵfac: i0.ɵɵFactoryDeclaration<LeafletLayersControlDirective, never>;
34 static ɵdir: i0.ɵɵDirectiveDeclaration<LeafletLayersControlDirective, "[leafletLayersControl]", never, { "layersControlConfig": { "alias": "leafletLayersControl"; "required": false; }; "layersControlOptions": { "alias": "leafletLayersControlOptions"; "required": false; }; }, { "layersControlReady": "leafletLayersControlReady"; }, never, never, false, never>;
35}