-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Override sprites #7251
Comments
@andrewharvey Are you suggesting that I can use loadimage on a sprites.png(sprite-sheet), and use addImage with an array of objects{width, height, and data}(sprite.json) to replicate the functionality of loading through the sprite property on the style object? |
This seems like a duplicate of #4804; an |
@jfirebaugh To be clear I am not requesting the ability to explicitly override sprite images by id, by the title I meant override the sprite sheets being used themselves (not the best choice of title). I am looking for a way to add sprites via an external sprite sheet that can have entirely different ids, without loading it through the sprite property in the style object. The reason being I would have to host multiple map styles per application for the sake of using a single sprite sheet. |
There is currently no way to override the sprite sheet used by the basic mapbox provided styles. Without creating a custom style for each predefined style in mapbox studio or hosting the style yourself. Both of which are cumbersome to keep up to date, especially when using multiple map styles per application.
A solution much like https://www.mapbox.com/mapbox-gl-js/example/local-ideographs/ for sprites where a URL/path is provided that overrides the default would be ideal.
But if there is a current way to dealing with this use case please let me know.
(Note: Why did you guys use a dot instead of the standard pin for marker in your sprite sheets for streets and satellite-streets, all I want is a basic marker shown in the maki general, that in a separate issue is claimed to be in all styles as a part of general?)
The text was updated successfully, but these errors were encountered: