Marker class
class
google.maps.Marker
extends MVCObject
library "marker"
const {Marker} = await google.maps.importLibrary("marker");
Constructor | |
|---|---|
Marker |
Marker([opts])Parameters:
Creates a marker with the options specified. If a map is specified, the marker is added to the map upon construction. Note that the position must be set for the marker to display. |
Constants | |
|---|---|
MAX_ZINDEX |
The maximum default z-index that the API will assign to a marker. You may set a higher z-index to bring a marker to the front. |
Methods | |
|---|---|
getAnimation |
getAnimation()Parameters: None
Return Value:
Animation|null|undefinedGet the currently running animation. |
getClickable |
getClickable()Parameters: None
Return Value:
boolean True if the Marker is clickable.Get the clickable status of the . |
getCursor |
getCursor()Parameters: None
Return Value:
string|null|undefinedGet the mouse cursor type shown on hover. |
getDraggable |
getDraggable()Parameters: None
Return Value:
boolean True if the Marker is draggable.Get the draggable status of the . |
getIcon |
getIcon()Parameters: None
Get the icon of the . See MarkerOptions.icon. |
getLabel |
getLabel()Parameters: None
Return Value:
MarkerLabel|string|null|undefinedGet the label of the . See MarkerOptions.label. |
getMap |
getMap()Parameters: None
Return Value:
Map|StreetViewPanorama|nullGet the map or panaroama the is rendered on. |
getOpacity |
getOpacity()Parameters: None
Return Value:
number|null|undefined A number between 0.0 and 1.0.Get the opacity of the . |
getPosition |
getPosition()Parameters: None
Return Value:
LatLng|null|undefinedGet the position of the . |
getShape |
getShape()Parameters: None
Return Value:
MarkerShape|null|undefined |
getTitle |
getTitle()Parameters: None
Return Value:
string|null|undefinedGet the title of the tooltip. See MarkerOptions.title. |
getVisible |
getVisible()Parameters: None
Return Value:
boolean True if the Marker is visible.Get the visibility of the . |
getZIndex |
getZIndex()Parameters: None
Return Value:
number|null|undefined zIndex of the Marker.Get the zIndex of the . See MarkerOptions.zIndex. |
setAnimation |
setAnimation([animation])Parameters:
Return Value: None
Start an animation. Any ongoing animation will be cancelled. Currently supported animations are: Animation.BOUNCE, |