-
Notifications
You must be signed in to change notification settings - Fork 502
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
Setting style as a json object directly for web #1279
Setting style as a json object directly for web #1279
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check that this still works with normal style urls?
@felix-ht Yes, it works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Simon Irmančnik <simon@naviter.com>
Co-authored-by: Simon Irmančnik <simon@naviter.com>
…ox-gl#1279)" This reverts commit 622146f.
@srmncnk Does this work for you, and if so how are you formatting the json? We use a stored file for our json styles but can't seem to get web to read them either as a direct string or file URL (which I note doesn't look to be set up) |
@aardrop Sorry for the late reply. Since interfaces are fixed, you always have to pass a string. String can be either a url to a style or a formatted json of a style (as a string). I'm pretty sure local file URL in the style won't work though. |
Thanks @srmncnk, I got that far, but I currently can't get any string json or string URL to work for Mapbox other than the basic on in the example. For example, this public URL (I will delete it shortly after you have a second to look at it) IDK if there is anything special to consider, I can test our json all the way to your code in the repo, but once it leaves there, I don't get any errors and can't find where it's breaking. |
I suggest you use Maputnik to test the style. Anything that renders there will render here as well. |
Through a vary annoying process, I finally found a problem. In the exported JSON from mapbox there was some unregistered character in the airport-label layer that was breaking the whole thing. |
This PR enabled users to set style as a json object directly in flutter for Web.
This is already supported by the underlying mapbox_gl_dart package, the usage of it in this package is corrected.