packages/core/src/lib/directives/marker.ts
AgmMarker renders a map marker inside a AgmMap.
```typescript
.agm-map-container {
height: 300px;
}
],
OnDestroy
OnChanges
AfterContentInit
FitBoundsAccessor
Providers |
{ provide: FitBoundsAccessor, useExisting: forwardRef(() => AgmMarker) }
|
Selector | agm-marker |
Properties |
|
Methods |
|
Inputs |
Outputs |
constructor(_markerManager: MarkerManager)
|
||||||
Parameters :
|
animation | |
Which animation to play when marker is added to a map. This can be 'BOUNCE' or 'DROP' |
iconUrl | |
Type : string | google.maps.Icon | google.maps.Symbol
|
|
Icon (the URL of the image) for the foreground. |
label | |
Type : string | google.maps.MarkerLabel
|
|
The label (a single uppercase character) for the marker. |
latitude | |
Type : number
|
|
The latitude position of the marker. |
longitude | |
Type : number
|
|
The longitude position of the marker. |
markerClickable | |
Default value : true
|
|
If true, the marker can be clicked. Default value is true. |
markerDraggable | |
Default value : false
|
|
If true, the marker can be dragged. Default value is false. |
opacity | |
Default value : 1
|
|
The marker's opacity between 0.0 and 1.0. |
openInfoWindow | |
Default value : true
|
|
Whether to automatically open the child info window when the marker is clicked. |
title | |
Type : string
|
|
The title of the marker. |
visible | |
Default value : true
|
|
If true, the marker is visible |
animationChange | |
Type : EventEmitter
|
|
This event is fired when the marker's animation property changes. |
drag | |
Type : EventEmitter<google.maps.MouseEvent>
|
|
This event is repeatedly fired while the user drags the marker. |
dragEnd | |
Type : EventEmitter<google.maps.MouseEvent>
|
|
This event is fired when the user stops dragging the marker. |
dragStart | |
Type : EventEmitter<google.maps.MouseEvent>
|
|
This event is fired when the user starts dragging the marker. |
markerClick | |
Type : EventEmitter<AgmMarker>
|
|
This event emitter gets emitted when the user clicks on the marker. |
markerDblClick | |
Type : EventEmitter<AgmMarker>
|
|
This event emitter gets emitted when the user clicks twice on the marker. |
markerRightClick | |
Type : EventEmitter<void>
|
|
This event is fired when the user rightclicks on the marker. |
mouseOut | |
Type : EventEmitter<google.maps.MouseEvent>
|
|
This event is fired when the user mouses outside the marker. |
mouseOver | |
Type : EventEmitter<google.maps.MouseEvent>
|
|
This event is fired when the user mouses over the marker. |
Private _addEventListeners |
_addEventListeners()
|
Returns :
void
|
Protected _updateFitBoundsDetails |
_updateFitBoundsDetails()
|
Returns :
void
|
getFitBoundsDetails$ |
getFitBoundsDetails$()
|
Returns :
Observable<FitBoundsDetails>
|
Private handleInfoWindowUpdate |
handleInfoWindowUpdate()
|
Returns :
void
|
id |
id()
|
Returns :
string
|
ngAfterContentInit |
ngAfterContentInit()
|
Returns :
void
|
ngOnChanges | ||||||
ngOnChanges(changes: literal type)
|
||||||
Parameters :
Returns :
void
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
toString |
toString()
|
Returns :
string
|
Protected Readonly _fitBoundsDetails$ |
Type : ReplaySubject<FitBoundsDetails>
|
Default value : new ReplaySubject<FitBoundsDetails>(1)
|
Private _id |
Type : string
|
Private _markerAddedToManger |
Default value : false
|
Private _observableSubscriptions |
Type : Subscription[]
|
Default value : []
|
infoWindow |
Type : QueryList<AgmInfoWindow>
|
Default value : new QueryList<AgmInfoWindow>()
|
Decorators :
@ContentChildren(AgmInfoWindow)
|