Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create marker cluster with multiple layer-group #67

Open
CharlotteAndre opened this issue May 31, 2022 · 0 comments
Open

Create marker cluster with multiple layer-group #67

CharlotteAndre opened this issue May 31, 2022 · 0 comments

Comments

@CharlotteAndre
Copy link

CharlotteAndre commented May 31, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant