1 | import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChange } from '@angular/core';
|
2 | import { InfoWindowManager } from '../services/managers/info-window-manager';
|
3 | import { AgmMarker } from './marker';
|
4 | /**
|
5 | * AgmInfoWindow renders a info window inside a {@link AgmMarker} or standalone.
|
6 | *
|
7 | * ### Example
|
8 | * ```typescript
|
9 | * import { Component } from '@angular/core';
|
10 | *
|
11 | * @Component({
|
12 | * selector: 'my-map-cmp',
|
13 | * styles: [`
|
14 | * .agm-map-container {
|
15 | * height: 300px;
|
16 | * }
|
17 | * `],
|
18 | * template: `
|
19 | * <agm-map [latitude]="lat" [longitude]="lng" [zoom]="zoom">
|
20 | * <agm-marker [latitude]="lat" [longitude]="lng" [label]="'M'">
|
21 | * <agm-info-window [disableAutoPan]="true">
|
22 | * Hi, this is the content of the <strong>info window</strong>
|
23 | * </agm-info-window>
|
24 | * </agm-marker>
|
25 | * </agm-map>
|
26 | * `
|
27 | * })
|
28 | * ```
|
29 | */
|
30 | export declare class AgmInfoWindow implements OnDestroy, OnChanges, OnInit {
|
31 | private _infoWindowManager;
|
32 | private _el;
|
33 | /**
|
34 | * The latitude position of the info window (only usefull if you use it ouside of a {@link
|
35 | * AgmMarker}).
|
36 | */
|
37 | latitude: number;
|
38 | /**
|
39 | * The longitude position of the info window (only usefull if you use it ouside of a {@link
|
40 | * AgmMarker}).
|
41 | */
|
42 | longitude: number;
|
43 | /**
|
44 | * Disable auto-pan on open. By default, the info window will pan the map so that it is fully
|
45 | * visible when it opens.
|
46 | */
|
47 | disableAutoPan: boolean;
|
48 | /**
|
49 | * All InfoWindows are displayed on the map in order of their zIndex, with higher values
|
50 | * displaying in front of InfoWindows with lower values. By default, InfoWindows are displayed
|
51 | * according to their latitude, with InfoWindows of lower latitudes appearing in front of
|
52 | * InfoWindows at higher latitudes. InfoWindows are always displayed in front of markers.
|
53 | */
|
54 | zIndex: number;
|
55 | /**
|
56 | * Maximum width of the infowindow, regardless of content's width. This value is only considered
|
57 | * if it is set before a call to open. To change the maximum width when changing content, call
|
58 | * close, update maxWidth, and then open.
|
59 | */
|
60 | maxWidth: number;
|
61 | /**
|
62 | * Holds the marker that is the host of the info window (if available)
|
63 | */
|
64 | hostMarker: AgmMarker;
|
65 | /**
|
66 | * Holds the native element that is used for the info window content.
|
67 | */
|
68 | content: Node;
|
69 | /**
|
70 | * Sets the open state for the InfoWindow. You can also call the open() and close() methods.
|
71 | */
|
72 | isOpen: boolean;
|
73 | /**
|
74 | * Emits an event when the info window is closed.
|
75 | */
|
76 | infoWindowClose: EventEmitter<void>;
|
77 | private static _infoWindowOptionsInputs;
|
78 | private _infoWindowAddedToManager;
|
79 | private _id;
|
80 | constructor(_infoWindowManager: InfoWindowManager, _el: ElementRef);
|
81 | ngOnInit(): void;
|
82 | /** @internal */
|
83 | ngOnChanges(changes: {
|
84 | [key: string]: SimpleChange;
|
85 | }): void;
|
86 | private _registerEventListeners;
|
87 | private _updateOpenState;
|
88 | private _setInfoWindowOptions;
|
89 | /**
|
90 | * Opens the info window.
|
91 | */
|
92 | open(): Promise<void>;
|
93 | /**
|
94 | * Closes the info window.
|
95 | */
|
96 | close(): Promise<void>;
|
97 | /** @internal */
|
98 | id(): string;
|
99 | /** @internal */
|
100 | toString(): string;
|
101 | /** @internal */
|
102 | ngOnDestroy(): void;
|
103 | }
|