google-maps-documentation

MarkerOptions interface

google.maps.MarkerOptions interface

MarkerOptions object used to define the properties that can be set on a Marker.

Properties
anchorPoint
Type:  Point optional
The offset from the marker's position to the tip of an InfoWindow that has been opened with the marker as anchor.
animation
Type:  Animation optional
Which animation to play when marker is added to a map.
clickable
Type:  boolean optional
If true, the marker receives mouse and touch events. Default value is true.
crossOnDrag
Type:  boolean optional
If false, disables cross that appears beneath the marker when dragging. This option is true by default.
cursor
Type:  string optional
Mouse cursor to show on hover
draggable
Type:  boolean optional
If true, the marker can be dragged. Default value is false.
icon
Type:  string|Icon|Symbol optional
Icon for the foreground. If a string is provided, it is treated as though it were an Icon with the string as url.
label
Type:  string|MarkerLabel optional
Adds a label to the marker. The label can either be a string, or a MarkerLabel object.
map
Type:  Map|StreetViewPanorama optional
Map on which to display Marker.
opacity
Type:  number optional
The marker's opacity between 0.0 and 1.0.
optimized
Type:  boolean optional
Optimization renders many markers as a single static element. Optimized rendering is enabled by default. Disable optimized rendering for animated GIFs or PNGs, or when each marker must be rendered as a separate DOM element (advanced usage only).
position
Type:  LatLng|LatLngLiteral optional
Marker position. Required.
shape
Type:  MarkerShape optional
Image map region definition used for drag/click.
title
Type:  string optional
Rollover text
visible
Type:  boolean optional
If true, the marker is visible
zIndex
Type:  number optional
All markers are displayed on the map in order of their zIndex, with higher values displaying in front of markers with lower values. By default, markers are displayed according to their vertical position on screen, with lower markers appearing in front of markers further up the screen.