Reputation: 7673
I've got a simple application working using mapbox-gl.js, and adding a marker layer with geoJSON. This works well if I use Mapbox's 'Streets' style, or if I duplicate the streets style as a custom style on my account.
However, I want to use a custom style based on the 'Light' style, and it appears that this doesn't include something that's required for displaying icons.
I've downloaded both styles as JSON, and swapped out the sprite
property, but that hasn't made a difference.
I've experimented with starting with the 'Streets' style and adjusting it to look the way I want, but that's a lot of changes to organise.
Is there something I can do, either in Mapbox Studio, or in the JS, to allow standard markers to be drawn?
Upvotes: 2
Views: 1446
Reputation: 3802
The set of icons available to a Mapbox style is determined by the style's sprite sheet.
Mapbox Streets (and clones of Mapbox Streets) include a default sprite sheet with the set of Maki icons.
Custom styles built from scratch (and several other official Mapbox styles) do not include a sprite sheet by default. You can add icons to these styles by following this guide.
I hope this helps!
EDIT: Per feedback from users (including you!) we are adding a standard set of icons to all our styles, including this one. You can expect the new styles to be deployed as of tomorrow. https://github.com/mapbox/mapbox-gl-styles/issues/241
Upvotes: 5