Skip to content

Marker

The VMapMarker component is used to display clickable/draggable icons on the map.

Basic usage

API

Attributes

Use marker options from leaflet documentation.

NameDescriptionTypeDefault
* latlng / v-modelPosition of the marker as a geographic point on the map. If you pass null then the marker will not be created until the value appears. RequiredLatLngExpression | null
iconIcon instance to use for rendering the marker. If not specified, a common instance of L.Icon.Default is used.Icon | DivIcon
opacityThe opacity of the marker.number
zIndexOffsetBy default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like 1000 (or high negative value, respectively).number
draggableWhether the marker is draggable with mouse/touch or not.booleanfalse

Events

Use marker events from leaflet documentation.

Slots

NameDescription
defaultThe default slot can be used to extend behavior.

Exposes

NameDescriptionType
markerLeaflet marker instance.Ref<Marker | null>

Released under the MIT License.