Skip to content

Latest commit

 

History

History
413 lines (412 loc) · 21.2 KB

Marker.md

File metadata and controls

413 lines (412 loc) · 21.2 KB

Marker class

google.maps.Marker class

This class extends MVCObject.

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.
Methods
getAnimation
getAnimation()
Parameters:  None
Return Value:  Animation
getClickable
getClickable()
Parameters:  None
Return Value:  boolean
getCursor
getCursor()
Parameters:  None
Return Value:  string
getDraggable
getDraggable()
Parameters:  None
Return Value:  boolean
getIcon
getIcon()
Parameters:  None
Return Value:  string|Icon|Symbol
getLabel
getLabel()
Parameters:  None
Return Value:  MarkerLabel
getMap
getMap()
Parameters:  None
Return Value:  Map|StreetViewPanorama
getOpacity
getOpacity()
Parameters:  None
Return Value:  number
getPosition
getPosition()
Parameters:  None
Return Value:  LatLng
getShape
getShape()
Parameters:  None
Return Value:  MarkerShape
getTitle
getTitle()
Parameters:  None
Return Value:  string
getVisible
getVisible()
Parameters:  None
Return Value:  boolean
getZIndex
getZIndex()
Parameters:  None
Return Value:  number
setAnimation
setAnimation(animation)
Parameters: 
Return Value:  None
Start an animation. Any ongoing animation will be cancelled. Currently supported animations are: BOUNCE, DROP. Passing in null will cause any animation to stop.
setClickable
setClickable(flag)
Parameters: 
  • flagboolean
Return Value:  None
setCursor
setCursor(cursor)
Parameters: 
  • cursorstring
Return Value:  None
setDraggable
setDraggable(flag)
Parameters: 
  • flagboolean
Return Value:  None
setIcon
setIcon(icon)
Parameters: 
Return Value:  None
setLabel
setLabel(label)
Parameters: 
Return Value:  None
setMap
setMap(map)
Parameters: 
Return Value:  None
Renders the marker on the specified map or panorama. If map is set to null, the marker will be removed.
setOpacity
setOpacity(opacity)
Parameters: 
  • opacitynumber
Return Value:  None
setOptions
setOptions(options)
Parameters: 
Return Value:  None
setPosition
setPosition(latlng)
Parameters: 
Return Value:  None
setShape
setShape(shape)
Parameters: 
Return Value:  None
setTitle
setTitle(title)
Parameters: 
  • titlestring
Return Value:  None
setVisible
setVisible(visible)
Parameters: 
  • visibleboolean
Return Value:  None
setZIndex
setZIndex(zIndex)
Parameters: 
  • zIndexnumber
Return Value:  None
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.
Events
animation_changed
function()
Arguments:  None
This event is fired when the marker's animation property changes.
click
function(event)
Arguments: 
This event is fired when the marker icon was clicked.
clickable_changed
function()
Arguments:  None
This event is fired when the marker's clickable property changes.
cursor_changed
function()
Arguments:  None
This event is fired when the marker's cursor property changes.
dblclick
function(event)
Arguments: 
This event is fired when the marker icon was double clicked.
drag
function(event)
Arguments: 
This event is repeatedly fired while the user drags the marker.
dragend
function(event)
Arguments: 
This event is fired when the user stops dragging the marker.
draggable_changed
function()
Arguments:  None
This event is fired when the marker's draggable property changes.
dragstart
function(event)
Arguments: 
This event is fired when the user starts dragging the marker.
flat_changed
function()
Arguments:  None
This event is fired when the marker's flat property changes.
icon_changed
function()
Arguments:  None
This event is fired when the marker icon property changes.
mousedown
function(event)
Arguments: 
This event is fired for a mousedown on the marker.
mouseout
function(event)
Arguments: 
This event is fired when the mouse leaves the area of the marker icon.
mouseover
function(event)
Arguments: 
This event is fired when the mouse enters the area of the marker icon.
mouseup
function(event)
Arguments: 
This event is fired for a mouseup on the marker.
position_changed
function()
Arguments:  None
This event is fired when the marker position property changes.
rightclick
function(event)
Arguments: 
This event is fired for a rightclick on the marker.
shape_changed
function()
Arguments:  None
This event is fired when the marker's shape property changes.
title_changed
function()
Arguments:  None
This event is fired when the marker title property changes.
visible_changed
function()
Arguments:  None
This event is fired when the marker's visible property changes.
zindex_changed
function()
Arguments:  None
This event is fired when the marker's zIndex property changes.
<script src="replace_links.js"></script>