Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • MarkerOptions

Index

Properties

Optional anchorPoint

anchorPoint?: null | Point

The offset from the marker's position to the tip of an InfoWindow that has been opened with the marker as anchor.

Optional animation

animation?: null | Animation

Which animation to play when marker is added to a map.

defaultvalue

null

Optional clickable

clickable?: null | boolean

If true, the marker receives mouse and touch events.

defaultvalue

true

Optional collisionBehavior

collisionBehavior?: null | string

Available only in the v=beta channel: https://goo.gle/3oAthT3. Set a collision behavior for markers on vector maps.

defaultvalue

null

Optional crossOnDrag

crossOnDrag?: null | boolean

If false, disables cross that appears beneath the marker when dragging.

defaultvalue

true

Optional cursor

cursor?: null | string

Mouse cursor type to show on hover.

defaultvalue

pointer

Optional draggable

draggable?: null | boolean

If true, the marker can be dragged.

defaultvalue

false

Optional icon

icon?: null | string | Icon | Symbol

Icon for the foreground. If a string is provided, it is treated as though it were an Icon with the string as url.

Optional label

label?: null | string | MarkerLabel

Adds a label to the marker. A marker label is a letter or number that appears inside a marker. The label can either be a string, or a MarkerLabel object. If provided and google.maps.MarkerOptions.title is not provided, an accessibility text (e.g. for use with screen readers) will be added to the marker with the provided label's text. Please note that the label is currently only used for accessibility text for non-optimized markers.

defaultvalue

null

Optional map

map?: null | Map | StreetViewPanorama

Map on which to display Marker. The map is required to display the marker and can be provided with google.maps.Marker.setMap if not provided at marker construction.

Optional opacity

opacity?: null | number

A number between 0.0, transparent, and 1.0, opaque.

defaultvalue

1.0

Optional optimized

optimized?: null | boolean

Optimization enhances performance by rendering many markers as a single static element. This is useful in cases where a large number of markers is required. Read more about marker optimization.

Optional position

position?: null | LatLng | LatLngLiteral

Sets the marker position. A marker may be constructed but not displayed until its position is provided - for example, by a user's actions or choices. A marker position can be provided with google.maps.Marker.setPosition if not provided at marker construction.

Optional shape

shape?: null | MarkerShape

Image map region definition used for drag/click.

Optional title

title?: null | string

Rollover text. If provided, an accessibility text (e.g. for use with screen readers) will be added to the marker with the provided value. Please note that the title is currently only used for accessibility text for non-optimized markers.

defaultvalue

undefined

Optional visible

visible?: null | boolean

If true, the marker is visible.

defaultvalue

true

Optional zIndex

zIndex?: null | number

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.

Generated using TypeDoc