Skip to content

LayersControl

The VMapLayersControl component is used to switch between different base layers and switch overlays on/off.

Basic usage

API

Attributes

Use layers control options from leaflet documentation.

NameDescriptionTypeDefault
currentBaseLayer / v-modelIndex or title of the selected layer.string | number0
currentOverlays / v-modelArray of indexes or titles for selected overlays.string[] | number[]
useIndexesIf true, then the number indexes in currentBaseLayer and currentOverlays will be used.booleanfalse
positionThe position of the control (one of the corners of the map). See types for possible values.ControlPosition | ExtraControlPosition'topright'

Events

No events.

Slots

NameDescription
defaultThe default slot can be used to extend behavior.

Exposes

NameDescriptionType
layersControlLeaflet layers control instance.Ref<Control.Layers | null>

Released under the MIT License.