Marker (deprecated)

Marker class

class google.maps.Marker extends MVCObject
library "marker"

const {Marker} = await google.maps.importLibrary("marker");
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.
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.
getAnimation
getAnimation()
Parameters: None
Return Value: Animation|null|undefined
Get the currently running animation.
getClickable
getClickable()
Parameters: None
Return Value: boolean True if the Marker is clickable.
Get the clickable status of the Marker.
getCursor
getCursor()
Parameters: None
Return Value: string|null|undefined
Get 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 Marker.
getIcon
getIcon()
Parameters: None
Return Value: string|Icon|Symbol|null|undefined
Get the icon of the Marker. See MarkerOptions.icon.
getLabel
getLabel()
Parameters: None
Return Value: MarkerLabel|string|null|undefined
Get the label of the Marker. See MarkerOptions.label.
getMap
getMap()
Parameters: None
Return Value: Map|StreetViewPanorama|null
Get the map or panaroama the Marker 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 Marker.
getPosition
getPosition()
Parameters: None
Return Value: LatLng|null|undefined
Get the position of the Marker.
getShape
getShape()
Parameters: None
Return Value: MarkerShape|null|undefined
Get the shape of the Marker used for interaction. See MarkerOptions.shape and MarkerShape.
getTitle
getTitle()
Parameters: None
Return Value: string|null|undefined
Get the title of the Marker tooltip. See MarkerOptions.title.
getVisible
getVisible()
Parameters: None
Return Value: boolean True if the Marker is visible.
Get the visibility of the Marker.
getZIndex
getZIndex()
Parameters: None
Return Value: number|null|undefined zIndex of the Marker.
Get the zIndex of the Marker. See MarkerOptions.zIndex.
setAnimation
setAnimation([animation])
Parameters:
  • animation: Animation optional The animation to play.
Return Value: None
Start an animation. Any ongoing animation will be cancelled. Currently supported animations are: Animation.BOUNCE,