packages/core/src/lib/directives/info-window.ts
AgmInfoWindow renders a info window inside a AgmMarker or standalone.
```typescript
.agm-map-container {
height: 300px;
}
],
selector | agm-info-window |
template |
Properties |
|
Methods |
|
Inputs |
Outputs |
constructor(_infoWindowManager: InfoWindowManager, _el: ElementRef)
|
|||||||||
Parameters :
|
disableAutoPan | |
Type : boolean
|
|
Disable auto-pan on open. By default, the info window will pan the map so that it is fully visible when it opens. |
isOpen | |
Default value : false
|
|
Sets the open state for the InfoWindow. You can also call the open() and close() methods. |
latitude | |
Type : number
|
|
The latitude position of the info window (only usefull if you use it ouside of a AgmMarker). |
longitude | |
Type : number
|
|
The longitude position of the info window (only usefull if you use it ouside of a AgmMarker). |
maxWidth | |
Type : number
|
|
Maximum width of the infowindow, regardless of content's width. This value is only considered if it is set before a call to open. To change the maximum width when changing content, call close, update maxWidth, and then open. |
zIndex | |
Type : number
|
|
All InfoWindows are displayed on the map in order of their zIndex, with higher values displaying in front of InfoWindows with lower values. By default, InfoWindows are displayed according to their latitude, with InfoWindows of lower latitudes appearing in front of InfoWindows at higher latitudes. InfoWindows are always displayed in front of markers. |
infoWindowClose | |
Type : EventEmitter<void>
|
|
Emits an event when the info window is closed. |
Private _registerEventListeners |
_registerEventListeners()
|
Returns :
void
|
Private _setInfoWindowOptions | ||||||
_setInfoWindowOptions(changes: literal type)
|
||||||
Parameters :
Returns :
void
|
Private _updateOpenState |
_updateOpenState()
|
Returns :
void
|
close |
close()
|
Closes the info window.
Returns :
Promise<void>
|
id |
id()
|
Returns :
string
|
ngOnChanges | ||||||
ngOnChanges(changes: literal type)
|
||||||
Parameters :
Returns :
void
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
open |
open()
|
Opens the info window.
Returns :
Promise<void>
|
toString |
toString()
|
Returns :
string
|
Private _id |
Type : string
|
Default value : (infoWindowId++).toString()
|
Private _infoWindowAddedToManager |
Default value : false
|
Private Static _infoWindowOptionsInputs |
Type : string[]
|
Default value : ['disableAutoPan', 'maxWidth']
|
content |
Type : Node
|
Holds the native element that is used for the info window content. |
hostMarker |
Type : AgmMarker
|
Holds the marker that is the host of the info window (if available) |