-
Notifications
You must be signed in to change notification settings - Fork 67
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
[StyleReader] Converting JSON into a Style #183
Comments
final jsonText = ...;
final json = jsonDecode(jsonText);
final style = ThemeReader().read(json); |
Thank you for the suggestion. But that is for the |
Is there a way to somehow create a Style object out of our already read Theme object? |
Have you tried the constructor? |
Hey folks, first of all, thank you @greensopinion for updating to the newest dependencies and for maintaining this library! <3 We would need a Decoding the json myself and then using the constructor of I would really appreciate a way by vector-map-tiles itself. I could also do a PR if you want me to! :) |
Makes sense. Similar work was started on #202 but it needs more work. |
I have opened #213, probably related :) |
Currently, it is only possible to provide a URL to fetch and read the style JSON from. For our application, we store the style JSON in our server and require a header with authentication set to fetch them, and so, we fetch them independently and receive the JSON from the server. But currently, it is not possible to parse the JSON into a
Style
. It would be great if the library had the ability to fetch theStyle
from a URL but also support parsing a JSON into aStyle
as well.It would also be better if we could pass additional headers to the
_httpGet
method inStyleReader
so we can use the existing code to fetch the Style from our servers as well.The text was updated successfully, but these errors were encountered: