vue-mapbox-gl
vue-mapbox-gl copied to clipboard
MapboxCluster: `id`s of layer and source
Hey @titouanmathis, is there any reason why you don't allow for a custom id and auto generate ones with add an incremental index, for the 4 components included in a cluster (source, clusters layer, cluster-point layer unclustered layer)?
https://github.com/studiometa/vue-mapbox-gl/blob/24bfc5552d9e319a7c4084732481e18ab887e31b/packages/vue-mapbox-gl/components/MapboxCluster.vue#L136-L139
I've noticed some issues when sometimes (haven't figured out when), the index ends up different from 0. Would it be possible to add a prop so that one can set a specific prefix? I can help with a PR if that can help.
Hi @tmlmt, this was done to be able to skip defining IDs each time we use the component. A prop allowing to override this behavior is a good idea and a PR is more than welcome :)
👍 Will get to it soon 😊