Skip to content
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

Support initializing map with string JSON style on iOS #3052

Open
michalgwo opened this issue Nov 27, 2024 · 0 comments
Open

Support initializing map with string JSON style on iOS #3052

michalgwo opened this issue Nov 27, 2024 · 0 comments

Comments

@michalgwo
Copy link

Is your feature request related to a problem? Please describe.
On Android, we can set style to a map either as a URI or JSON using Style.Builder i.e. Style.Builder().fromJson() or Style.Builder().fromUri(), but on iOS the only option (at least it's the only one I found) is to set styleURL. Setting a style with JSON as a String is useful in my use case when I edit the style in code before initializing a map. The same applies to MapSnapshotter.

Describe the solution you'd like

  • Create a new instance property of MLNMapView - styleJSON and/or create the function setStyleJSON.
  • Create a new instance property of MLNMapSnapshotOptions - styleJSON

Describe alternatives you've considered
I was thinking about saving a style to a file every time it's edited and then reading it from the file, but it's more a workaround than a real solution. I didn't really explore this option, so I don't even know if it's possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants