-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Feature request: Allow file URLs for the "sprite" property of styles #1123
Comments
This works by specifying |
It does. I will confirm it's working Monday. Thank you. |
Works for now. I can get the path of the sprite resources, strip off the extension, then load the style dictionary and set the "sprite" attribute to "asset://" + absolute runtime path to resource. Much better than loading from a URL. p.s. Just in case you don't hear it often enough, you guys are doing a great job with this project! |
If there's anything that you think should change about the API, please create a ticket. |
I think there are already some open issues that capture this, but I think splitting out the sprite sheet from the style would improve things a lot. One of the most typical uses of the map would be to use an existing style, but add custom annotations. Either the style needs to be able to support multiple sprite asset sheets, or there needs to be a way to set display properties to the annotation itself, either as vector drawing in a UIView (preferable) or bitmap. It's unfortunate that we are drawing a beautiful vector-based maps, then plunking down bitmap images of icons on top. |
Yeah, #941 is the canonical spot for user-provided sprite imagery at runtime. It wasn't yet on my radar to think about vectors, just bitmaps, but stay tuned as we build that out. |
Currently only http:// and https:// URLs appear to be supported as URLs in the "sprite" property of a style. It would be very useful to also allow file:/// URLs so that spite JSON and PNG files could be bundled with the app rather than hosted externally.
The text was updated successfully, but these errors were encountered: