Skip to content
Discussion options

You must be logged in to vote

I finally found the cause of my problem. According to the package documentation, in the Map Styles section (see point 4), it is specified that it is only possible to provide the JSON content in raw form (in a String) on Android. In my code, I was using: rootBundle.loadString(...) to retrieve the style, which worked on Android but was problematic on iOS. So I realized that it wasn't necessary to wait for the style to be loaded in raw form for iOS. The solution is simply to specify the asset path directly in the styleString parameter, as follows:

MapLibreMap(
  styleString: “assets/styles/style-default.json”,
  // other parameters...
)

This modification solves the problem of displaying the…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by azertyuiop23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant