google.maps.MarkerOptions
interface
MarkerOptions object used to define the properties that can be set on a Marker.
| Properties | |
|---|---|
anchorPoint |
Type:
Point optionalThe offset from the marker's position to the tip of an InfoWindow that has been opened with the marker as anchor. |
animation |
Type:
Animation optionalWhich animation to play when marker is added to a map. |
clickable |
Type:
boolean optionalIf true, the marker receives mouse and touch events. Default value is true. |
crossOnDrag |
Type:
boolean optionalIf false, disables cross that appears beneath the marker when dragging. This option is true by default. |
cursor |
Type:
string optionalMouse cursor to show on hover |
draggable |
Type:
boolean optionalIf true, the marker can be dragged. Default value is false. |
icon |
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 optionalAdds a label to the marker. The label can either be a string, or a MarkerLabel object. |
map |
Type:
Map|StreetViewPanorama optionalMap on which to display Marker. |
opacity |
Type:
number optionalThe marker's opacity between 0.0 and 1.0. |
optimized |
Type:
boolean optionalOptimization 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 optionalMarker position. Required. |
shape |
Type:
MarkerShape optionalImage map region definition used for drag/click. |
title |
Type:
string optionalRollover text |
visible |
Type:
boolean optionalIf true, the marker is visible |
zIndex |
Type:
number optionalAll 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. |