Repository navigation
fixes #892: support mapbox:// style URLs - #1161
Conversation
|
As far as I can gather, we don't need to set a |
There was a problem hiding this comment.
Can we drop this case and require the app developer to use "asset://..." if that's what they want?
There was a problem hiding this comment.
setStyleURL: is private right now. At such time that we support in-framework setting of a style URL (versus download of JSON externally and passing that) I think we could, but also, it's weird to use asset:// — this has no meaning outside of GL and typically a Cocoa dev would use +[NSURL fileURLWithPath].
There was a problem hiding this comment.
It may have no meaning outside of our codebase, but we use to to make our styles compatible across renderers.
There was a problem hiding this comment.
Right, no qualms with it, I'd just rather not expose the scheme to end users if we can avoid it.
Yes, they should be using |
|
Ok, I'm going to merge this then once CI passes. |
|
👍 |
fixes #892: support mapbox:// style URLs
|
Can you please add tests for this? |
|
Will do. |
|
Tests done in #1167. |
Addresses #892 and ports over mapbox/mapbox-gl-js@699826a.
This lets the user continue to pass a bundled style like
styles/emerald-v7.jsonfrom Cocoa, which will get converted into anasset://URL as before.But if a style URL like
mapbox://justin.80b0e36dis passed instead, it gets converted to the style API format and loaded via the regular remote style URL facility.One thing I'm not clear on:
baseshould be inStyleInfo. Does this matter for URL-based styles @kkaefer @jfirebaugh? Going to keep digging into this but can't quite figure it out yet.