vue2-leaflet-markercluster
vue2-leaflet-markercluster copied to clipboard
Create marker cluster with multiple layer-group
Hi, I'm using marker-cluster with layer-group where each layer represents a depth in a same point in the sea. My code a for now constructed like that
<l-control-layers :collapsed="true"></l-control-layers>
<l-layer-group layerType="overlay" v-for="code in depth_codes" :key="code.depth"
:name="code.depth" :visible="code.visible" >
<v-marker-cluster :options="clusterOptions">
<div v-for="(circle,index) in circles.filter(({depth}) => depth === code.depth)" v-bind:key="index">
<l-circle-marker v-for="(point,index_point) in circle.coordinate"
v-bind:key="index_point"
:lat-lng="point.center"
:radius="point.radius"
:color="circle.color">
<l-tooltip>{{ point.text}}{{ point.radius }}</l-tooltip>
</l-circle-marker>
</div>
</v-marker-cluster>
</l-layer-group>
My problem is the following, my marker cluster only appear of point are in the same layer-group.... But i really would like for them to include all points for close location even if they are in different layer... So I already tried to move the <v-marker-cluster>
outside of my l-layer-group div but nothing seems to appear... Any idea on how to do it ?
Version : leaflet : 1.7.1 vue2-leaflet : 2.7.1 vue2-leaflet-markercluster : 3.1.0 vue : 2.6.11