The offset from the marker's position to the tip of an InfoWindow that has been opened with the marker as anchor.
Which animation to play when marker is added to a map.
If true
, the marker receives mouse and touch events.
Available only in the v=beta channel: https://goo.gle/3oAthT3. Set a collision behavior for markers on vector maps.
If false
, disables cross that appears beneath the marker
when dragging.
Mouse cursor type to show on hover.
If true
, the marker can be dragged.
Icon for the foreground. If a string is provided, it is treated as though
it were an Icon
with the string as url
.
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.
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.
A number between 0.0, transparent, and 1.0, opaque.
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.
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.
Image map region definition used for drag/click.
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.
If true
, the marker is visible.
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
MarkerOptions object used to define the properties that can be set on a Marker.
As of February 21st, 2024, google.maps.Marker is deprecated. Please use google.maps.marker.AdvancedMarkerElement instead. Please see https://developers.google.com/maps/deprecations for deprecation details and https://developers.google.com/maps/documentation/javascript/advanced-markers/migration for the migration guide.