Mapbox-gl-js: Add custom markers to layer

Created on 4 Sep 2017  路  3Comments  路  Source: mapbox/mapbox-gl-js

Is there a way to add a bunch of custom markers to a layer?

I've got custom, inline SVG markers, which afaik I can't add as symbols. I simply add them with new mapboxgl.Marker(el).addTo(map), but I'd like to have are the possibilities of a layer; i.e. group a bunch of custom markers in one layer, make them appear and disappear under certain conditions like zoom-level.

Also, clustering custom markers with custom cluster icons would also be really nice, but I believe that might be possible with https://github.com/mapbox/supercluster ?

Most helpful comment

Okay thanks. What if I'd change the question to a feature request?

All 3 comments

Hi, thanks for using Mapbox. For "how do I" questions like this, please refer to our help documentation, and if you can't find the answer there, contact support. This issue tracker is for reporting bugs and feature requests. Thank you!

Okay thanks. What if I'd change the question to a feature request?

I'd like to know the same. Looks like its not possible currently so +1 for a feature request.

Was this page helpful?
0 / 5 - 0 ratings