-
Notifications
You must be signed in to change notification settings - Fork 121
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
How to load an mbtiles file #318
Comments
I actually think it should work at least on Android and iOS (see e.g. maplibre/maplibre-native#17), but I haven't tried it recently. In your merge request, would you want to expose the addProtocol functionality completely in this library, or would you only specifically want to enable loading mbtiles files? |
Thank you for your answer, if mbtiles:// is already working then that's perfect :) ! Is there some documentation somewhere? I just added an mbtiles file into my resources folder (in my project root) and added this:
But the app crashes with the following error (indicating that indeed mbtiles support seems there, it's juste that my file is not found): EDIT: alright I got it working putting the file to the external storage rather than in assets. Here's the code:
Thank you again for your answer :) |
That's great to hear! I adjusted the title since this might be relevant for more people in the future. |
Yes indeed an addition to the doc would be nice, that's a common use case I think :) |
Did you already check if your solution also works on iOS? |
It also works on iOS, but it needs some more work (on both platforms):
|
Thanks for the feedback. That sounds interesting, have you tried playing with the min/max zoom of the style layers? |
I tested another way to load an mbtiles. And It's working.
And style.json has this.
Thanks this library! |
Hello,
I need to be able to display local .mbtiles files. Using mablibre-gl-js this would be done using the addProtocol method.
It is unsupported yet in flutter-mapblibre-gl, right? Would you be interested by a merge request for this? If so, do you have any guide for setting up a dev environment?
The text was updated successfully, but these errors were encountered: