Skip to content

Commit 37fd93a

Browse files
committed
docs: update leaflet.markercluster option doc
1 parent 836eca8 commit 37fd93a

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

docs/guide/marker-cluster.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,33 @@ const onMapReady = () => {
9999

100100
## Options
101101

102+
Here are the options available for the `useLMarkerCluster` composable.
103+
104+
| Option | Type | Description |
105+
| ------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
106+
| leafletObject | [Leaflet Map](https://github.com/Leaflet/Leaflet/blob/main/src/map/Map.js) | **(required)** The Leaflet Map object to attach the marker cluster group to. |
107+
| markers | Marker | **(required)** Array of locations to display on the map (documented in next section) |
108+
| options | [MarkerClusterGroupOptions](https://github.com/Leaflet/Leaflet.markercluster/tree/master?tab=readme-ov-file#defaults) | Legacy options to pass to the marker cluster group. |
109+
102110
Here are the options available for each marker in the `markers` prop.
103111

104-
| Event name | Type | Description |
105-
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
106-
| name | string | **(optional)** Name of the location, will be displayed in a tooltip. If not provided, no tooltip will be displayed |
107-
| lat | number | Latitude of the location |
108-
| lng | number | Longitude of the location |
109-
| options | object | **(optional)** Standard [Leaflet Marker options](https://leafletjs.com/reference.html#marker) |
110-
| popup | string | **(optional)** If provided, it is considered as an HTML string and will be displayed as a popup on the marker |
112+
| Option | Type | Description |
113+
| ------- | ------ | ------------------------------------------------------------------------------------------------------------------ |
114+
| name | string | **(optional)** Name of the location, will be displayed in a tooltip. If not provided, no tooltip will be displayed |
115+
| lat | number | Latitude of the location |
116+
| lng | number | Longitude of the location |
117+
| options | object | **(optional)** Standard [Leaflet Marker options](https://leafletjs.com/reference.html#marker) |
118+
| popup | string | **(optional)** If provided, it is considered as an HTML string and will be displayed as a popup on the marker |
119+
120+
Here are the options available for the `options` prop.
121+
122+
| Option | Type | Description |
123+
| -------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
124+
| showCoverageOnHover | boolean | When you mouse over a cluster it shows the bounds of its markers. |
125+
| zoomToBoundsOnClick | boolean | When you click a cluster we zoom to its bounds. |
126+
| spiderfyOnMaxZoom | boolean | When you click a cluster at the bottom zoom level we spiderfy it so you can see all of its markers. |
127+
| removeOutsideVisibleBounds | boolean | Clusters and markers too far from the viewport are removed from the map for performance. |
128+
| spiderLegPolylineOptions | object | Allows you to specify PolylineOptions to style spider legs. By default, they are { weight: 1.5, color: '#222', opacity: 0.5 }. |
111129

112130
## Recipes
113131

0 commit comments

Comments
 (0)