Skip to content

🧩 LHotline

A polyline with colored gradients.

🧪 Demo

vue
<script setup lang="ts">
import { LMap, LTileLayer } from '@maxel01/vue-leaflet'
import { LHotline } from '@maxel01/vue-leaflet-plugins'
</script>

<template>
    <LMap :zoom="9" :center="[47.31322, -1.319482]">
        <LTileLayer
            url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
            layer-type="base"
            name="OpenStreetMap"
        />
        <LHotline
            :lat-lngs="[
                [47.334852, -1.509485, 150],
                [47.342596, -1.328731, 250],
                [47.241487, -1.190568, 350],
                [47.234787, -1.358337, 250]
            ]"
            :min="150"
            :max="350"
        />
    </LMap>
</template>

⚙️ Props

Prop nameDescriptionTypeReactiveDefaultRequired
minMinimum z valuenumbertrue-false
maxMaximum z valuenumbertrue-false
outlineWidthThe width of the outlinenumbertrue-false
outlineColorThe color of the outlinestringtrue-false
paletteThe color paletteColorPalettetrue-false

🔗 Inherited props

from PolylineProps
Prop nameDescriptionTypeReactiveDefaultRequired
latLngsArray of coordinates objects that represent the polyline.LatLngExpression[]true-true
------------------
smoothFactorHow much to simplify the polyline on each zoom level. More means better performance and smoother looks, and less means more accurate representation.`numberundefined`true-
noClipDisable polyline clipping.`booleanundefined`true-
from PathProps
Prop nameDescriptionTypeReactiveDefaultRequired
strokeWhether to draw stroke along the path. Set it to false to disable borders on polygons or circles.`booleanundefined`true-
colorStroke color`stringundefined`true-
weightStroke width in pixels`numberundefined`true-
opacityStroke opacity`numberundefined`true-
lineCapA string that defines shape to be used at the end of the stroke.`LineCapShapeundefined`true-
lineJoinA string that defines shape to be used at the corners of the stroke.`LineJoinShapeundefined`true-
dashArrayA string that defines the stroke dash pattern.`stringundefined`true-
dashOffsetA string that defines the distance into the dash pattern to start the dash.`stringundefined`true-
fillWhether to fill the path with color. Set it to false to disable filling on polygons or circles.`booleanundefined`true-
fillColorFill color`stringundefined`true-
fillOpacityFill opacity`numberundefined`true-
fillRuleA string that defines how the inside of a shape is determined.`FillRuleundefined`true-
classNameCustom class name set on an element. Only for SVG renderer.`stringundefined`true-
from InteractiveLayerProps
Prop nameDescriptionTypeReactiveDefaultRequired
interactiveIf false, the layer will not emit pointer events and will act as a part of the underlying map.`booleanundefined`initOnly-
bubblingPointerEventsWhen true, a pointer event on this path will trigger the same event on the map (unless DomEvent.stopPropagation is used).`booleanundefined`initOnly-
from LayerProps
Prop nameDescriptionTypeReactiveDefaultRequired
paneBy default, the layer will be added to the map's overlay pane. Overriding this option will cause the layer to be placed on another pane by default. Not effective if the renderer option is set (the renderer option will override the pane option).`stringundefined`initOnly-
attributionString to be shown in the attribution control, e.g. "© OpenStreetMap contributors". It describes the layer data and is often a legal obligation towards copyright holders and tile providers.`stringundefined`true-
name-`stringundefined`true-
layerType-`LayerTypeundefined`true-
visible-`booleanundefined`true-
from ComponentProps
Prop nameDescriptionTypeReactiveDefaultRequired
optionsLeaflet options to pass to the component constructor.`Tundefined`initOnly-

🎯 Slots

NameDescription
defaultUsed to inject Leaflet child components like <LPopup> or <LTooltip> into the LHotline.

🧭 Exposes

NameTypeDescription
readyRef<boolean>Indicates whether the component and its underlying Leaflet object are fully initialized.
leafletObjectRef<Hotline | undefined>The underlying Leaflet instance. Can be used to directly interact with the Leaflet API (e.g. calling methods or accessing internal state).