1 | import { ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, SimpleChange } from '@angular/core';
|
2 | import { LatLng, LatLngBounds, LeafletEvent, LeafletMouseEvent, Map, MapOptions } from 'leaflet';
|
3 | export declare class LeafletDirective implements OnChanges, OnDestroy, OnInit {
|
4 | private element;
|
5 | private zone;
|
6 | readonly DEFAULT_ZOOM = 1;
|
7 | readonly DEFAULT_CENTER: LatLng;
|
8 | readonly DEFAULT_FPZ_OPTIONS: {};
|
9 | resizeTimer: any;
|
10 | map: Map;
|
11 | fitBoundsOptions: {};
|
12 | panOptions: {};
|
13 | zoomOptions: {};
|
14 | zoomPanOptions: {};
|
15 | options: MapOptions;
|
16 | mapReady: EventEmitter<Map>;
|
17 | zoom: number;
|
18 | zoomChange: EventEmitter<number>;
|
19 | center: LatLng;
|
20 | centerChange: EventEmitter<LatLng>;
|
21 | fitBounds: LatLngBounds;
|
22 | maxBounds: LatLngBounds;
|
23 | minZoom: number;
|
24 | maxZoom: number;
|
25 | onClick: EventEmitter<LeafletMouseEvent>;
|
26 | onDoubleClick: EventEmitter<LeafletMouseEvent>;
|
27 | onMouseDown: EventEmitter<LeafletMouseEvent>;
|
28 | onMouseUp: EventEmitter<LeafletMouseEvent>;
|
29 | onMouseMove: EventEmitter<LeafletMouseEvent>;
|
30 | onMouseOver: EventEmitter<LeafletMouseEvent>;
|
31 | onMouseOut: EventEmitter<LeafletMouseEvent>;
|
32 | onMapMove: EventEmitter<LeafletEvent>;
|
33 | onMapMoveStart: EventEmitter<LeafletEvent>;
|
34 | onMapMoveEnd: EventEmitter<LeafletEvent>;
|
35 | onMapZoom: EventEmitter<LeafletEvent>;
|
36 | onMapZoomStart: EventEmitter<LeafletEvent>;
|
37 | onMapZoomEnd: EventEmitter<LeafletEvent>;
|
38 | private mapEventHandlers;
|
39 | constructor(element: ElementRef, zone: NgZone);
|
40 | ngOnInit(): void;
|
41 | ngOnChanges(changes: {
|
42 | [key: string]: SimpleChange;
|
43 | }): void;
|
44 | ngOnDestroy(): void;
|
45 | getMap(): Map;
|
46 | onResize(): void;
|
47 | private addMapEventListeners;
|
48 | /**
|
49 | * Resize the map to fit it's parent container
|
50 | */
|
51 | private doResize;
|
52 | /**
|
53 | * Manage a delayed resize of the component
|
54 | */
|
55 | private delayResize;
|
56 | /**
|
57 | * Set the view (center/zoom) all at once
|
58 | * @param center The new center
|
59 | * @param zoom The new zoom level
|
60 | */
|
61 | private setView;
|
62 | /**
|
63 | * Set the map zoom level
|
64 | * @param zoom the new zoom level for the map
|
65 | */
|
66 | private setZoom;
|
67 | /**
|
68 | * Set the center of the map
|
69 | * @param center the center point
|
70 | */
|
71 | private setCenter;
|
72 | /**
|
73 | * Fit the map to the bounds
|
74 | * @param latLngBounds the boundary to set
|
75 | */
|
76 | private setFitBounds;
|
77 | /**
|
78 | * Set the map's max bounds
|
79 | * @param latLngBounds the boundary to set
|
80 | */
|
81 | private setMaxBounds;
|
82 | /**
|
83 | * Set the map's min zoom
|
84 | * @param number the new min zoom
|
85 | */
|
86 | private setMinZoom;
|
87 | /**
|
88 | * Set the map's min zoom
|
89 | * @param number the new min zoom
|
90 | */
|
91 | private setMaxZoom;
|
92 | }
|