dimfeld / svelte-maplibre

Svelte bindings for the MapLibre mapping library
https://svelte-maplibre.vercel.app
MIT License
319 stars 40 forks source link

Clusters with HTML/SVG markers #11

Closed dimfeld closed 1 year ago

dimfeld commented 1 year ago

Base Example: https://maplibre.org/maplibre-gl-js-docs/example/cluster-html/

First impression is that this should be a ClusterMarker component which renders an element with a slot for each feature marker. The element around the slot should have an action which handles adding it to the map in a similar way to the loop in the example's updateMarkers function.