๐งฉ LCircleMarker โ
A circle of a fixed size with radius specified in pixels.
๐งช Demo โ
vue
<script setup lang="ts">
import { LCircleMarker, LMap, LTileLayer } from '@maxel01/vue-leaflet'
import { ref } from 'vue'
const zoom = ref<number>(16)
</script>
<template>
<LMap ref="map" v-model:zoom="zoom" :center="[41.89026, 12.49238]">
<LTileLayer
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
layer-type="base"
name="OpenStreetMap"
/>
<LCircleMarker
:lat-lng="[41.89026, 12.49238]"
:radius="50"
color="red"
/>
</LMap>
</template>
โ๏ธ Props โ
Prop name | Description | Type | Reactive | Default | Required |
---|---|---|---|---|---|
radius | Radius of the marker, in pixels | number | true | - | false |
latLng | Position of the circle marker | LatLngExpression | true | - | true |
๐ Inherited props โ
from PathProps
Prop name | Description | Type | Reactive | Default | Required |
---|---|---|---|---|---|
className | Custom class name set on an element. Only for SVG renderer. | string | true | - | false |
fillRule | A string that defines how the inside of a shape is determined. | FillRule | true | - | false |
fillOpacity | Fill opacity | number | true | - | false |
fillColor | Fill color | string | true | - | false |
fill | Whether to fill the path with color. Set it to false to disable filling on polygons or circles. | boolean | true | - | false |
dashOffset | A string that defines the distance into the dash pattern to start the dash. | string | true | - | false |
dashArray | A string that defines the stroke dash pattern. | string | true | - | false |
lineJoin | A string that defines shape to be used at the corners of the stroke. | LineJoinShape | true | - | false |
lineCap | A string that defines shape to be used at the end of the stroke. | LineCapShape | true | - | false |
opacity | Stroke opacity | number | true | - | false |
weight | Stroke width in pixels | number | true | - | false |
color | Stroke color | string | true | - | false |
stroke | Whether to draw stroke along the path. Set it to false to disable borders on polygons or circles. | boolean | true | - | false |
from InteractiveLayerProps
Prop name | Description | Type | Reactive | Default | Required |
---|---|---|---|---|---|
interactive | If false , the layer will not emit pointer events and will act as a part of the underlying map. | boolean | initOnly | - | false |
bubblingMouseEvents | When true , a pointer event on this path will trigger the same event on the map (unless DomEvent.stopPropagation is used). | boolean | initOnly | - | false |
from LayerProps
Prop name | Description | Type | Reactive | Default | Required |
---|---|---|---|---|---|
visible | - | boolean | true | - | false |
layerType | - | LayerType | true | - | false |
name | - | string | true | - | false |
attribution | String 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. | string | true | - | false |
pane | By 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). | string | initOnly | - | false |
from ComponentProps
Prop name | Description | Type | Reactive | Default | Required |
---|---|---|---|---|---|
options | Leaflet options to pass to the component constructor. | T | initOnly | - | false |
๐ก Emits โ
Event | Arguments | Description |
---|---|---|
update:visible | boolean | Triggers when the visible prop needs to be updated |
ready | T | Triggers when the component is ready |
๐ฏ Slots โ
Name | Description |
---|---|
default | Used to inject Leaflet child components like <LPopup> or <LTooltip> into the LCircleMarker . |
๐งญ Exposes โ
Name | Type | Description |
---|---|---|
ready | Ref<boolean> | Indicates whether the component and its underlying Leaflet object are fully initialized. |
leafletObject | Ref<CircleMarker | undefined> | The underlying Leaflet instance. Can be used to directly interact with the Leaflet API (e.g. calling methods or accessing internal state). |