Replies: 1 comment 1 reply
-
Has anyone been able to make this work at all recently? I haven't been able to make either options work, both give me Mapbox error Map load failed: {begin=2977762474096, source-id=omv, message=Failed to load source: Expected URL scheme 'http' or 'https' but was 'mbtiles', type=source}. I'm using the example file at the bottom of this page: https://docs.mapbox.com/help/glossary/mbtiles/ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
In my app, I'm trying to support both online and offline rendering of maps. I've got a bunch of
.mbtiles
files generated for geographic locations roughly the size of a small country / or US State. Before users go offline, they can download mbtiles files for different regions to use when they are offline.I'm using v8.5.0 of the library (I'm happy to retest on main if it would make it easier). I've got a simple example setup that allows you to download an mbtile file for West Virginia, and then allows you to switch between online and offline modes.
I have a style file bundled with the app. If you hit the 'offline' button, the styleJSON for the map is setup like this:
As you can see, I can make it work on iOS if i use the
tiles:
line -- and I can only make it work on android or iOS if I use theurl:
line.I'd prefer to use the
tiles:
syntax if possible because it looks like I could add a list of.mbtiles
to the array in the case they've download multiple offline regions (not sure how I'd do that with theurl
syntax...)Would anyone happen to know why this might be the case? Maybe this is just a difference in the iOS / Android maplibre libraries and I should really be asking them?
I'm happy to share my simple example if it would help shed any light..
thanks,
Sam
Beta Was this translation helpful? Give feedback.
All reactions