Skip to main content

Marker

Marker component

[See](source code) ,[See](Official documentation) ,[See](Official reference)

Props

Prop nameDescriptionTypeValuesDefault
animationWhich animation to play when marker is added to a map.
@see https://developers.google.com/maps/documentation/javascript/reference/marker
number-undefined
attributionThis property was not found on the Googole Maps documentation, but it was defined in the previous version of this component.
Any suggestion is welcome here.
object-undefined
clickableIf true, the marker receives mouse and touch events. Default value is true.
@see https://developers.google.com/maps/documentation/javascript/reference/marker
boolean-true
cursorMouse cursor type to show on hover.
@see https://developers.google.com/maps/documentation/javascript/reference/marker
string-undefined
draggableIf true, the marker can be dragged. Default value is false.
@see https://developers.google.com/maps/documentation/javascript/reference/marker
boolean-false
iconIcon for the foreground. If a string is provided, it is treated as though it were an Icon with the string as url.
Its type can be string|Icon|Symbol optional
@see Icon type
@see Symbol type
@see https://developers.google.com/maps/documentation/javascript/reference/marker
string|object-undefined
labelAdds 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 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.
@see https://developers.google.com/maps/documentation/javascript/reference/marker
string|object-undefined
opacityA number between 0.0, transparent, and 1.0, opaque.
@see https://developers.google.com/maps/documentation/javascript/reference/marker
number-1
optionsExtra options passed to this component.object-undefined
placeThis property was not found on the Googole Maps documentation, but it was defined in the previous version of this component.
Any suggestion is welcome here.
object-undefined
positionMarker position. The position is required to display the marker and can be provided with Marker.setPosition if not provided at marker construction.
@see https://developers.google.com/maps/documentation/javascript/reference/marker
object-undefined
shapeImage map region definition used for drag/click.
@see MarkerShape type
@see https://developers.google.com/maps/documentation/javascript/reference/marker
object-undefined
titleRollover 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.
@see https://developers.google.com/maps/documentation/javascript/reference/marker
string-undefined
visibleIf true, the marker is visible.
@see https://developers.google.com/maps/documentation/javascript/reference/marker
boolean-true
zIndexAll 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.
@see https://developers.google.com/maps/documentation/javascript/reference/marker
number-undefined

Events

Event namePropertiesDescription
update:positionposition Object - Object with lat and lng values, eg: { lat: 10.0, lng: 10.0 }An event to detect when a position changes

Slots

NameDescriptionBindings
defaultDefault slot of the component.