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

Duplicate source ID for mulitple cluster #75

Closed
Rafnuss opened this issue Dec 26, 2022 · 1 comment · Fixed by #83
Closed

Duplicate source ID for mulitple cluster #75

Rafnuss opened this issue Dec 26, 2022 · 1 comment · Fixed by #83

Comments

@Rafnuss
Copy link

Rafnuss commented Dec 26, 2022

I'm getting the following error:

Error: There is already a source with this ID

When I'm using two MapboxCluster

 <MapboxMap
          map-style="mapbox://styles/mapbox/streets-v11"
          style="height: 100%"
          access-token="pk.eyJ1IjoicmFmbnVzcyIsImEiOiIzMVE1dnc0In0.3FNMKIlQ_afYktqki-6m0g"
          @mb-created="(mapInstance) => (map = mapInstance)"
        >
          <MapboxCluster
            :data="myLocationGeojson"
          />
          <MapboxCluster
            :data="hotspotGeojson"
          />
        </MapboxMap>

The id seems to be "mb-cluster-0-source" for both MapboxSource created.
Is there a way to define this id at construction?

@titouanmathis
Copy link
Collaborator

Thanks for the report @Rafnuss, this should be fixed as of v2.0.3.

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

Successfully merging a pull request may close this issue.

2 participants