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

Offline MBTiles support? #17

Closed
carlos-mg89 opened this issue Feb 12, 2021 · 5 comments
Closed

Offline MBTiles support? #17

carlos-mg89 opened this issue Feb 12, 2021 · 5 comments

Comments

@carlos-mg89
Copy link

I haven't been able to find in the repository and/or documentation if there's support for offline vector (and raster too) MBTiles?

I admit I don't know if that was possible in the original Mapbox implementation, so if it wasn't there, it's quite likely it isn't in this project at the moment.

Aside from this, is there any documentation for how to use the library? So far I've seen how to set it up, but not how to interact with it. E.g.: add markers, draw paths, etc.

Thank you in advance and apologies if this isn't the proper place where to ask about this. I'd more than happy to move this question somewhere else.

@roblabs
Copy link
Collaborator

roblabs commented Feb 12, 2021

Support for other protocols besides https are in the code, but I agree it could use some upgrades in the documentation. Pull requests for documentation and test samples are welcome.

Protocols asset://, file://, and mbtiles:// are listed in the MapLibre code. mbtiles:// is new to MapLibre since its donation by MapTiler. The asset and file protocols were in Mapbox GL native.

https://github.com/maplibre/maplibre-gl-native/blob/cd8d56467962cfb4c99418b0226d9ea2adb48c30/include/mbgl/util/constants.hpp#L62-L65


Here is a list of published apps which mention using MapLibre. A future Wiki should list the published apps that make use MapLibre.

@carlos-mg89
Copy link
Author

Thanks for the info @roblabs I'd definitely give it a try!

@SpeedFire0
Copy link

So far I've seen how to set it up, but not how to interact with it. E.g.: add markers, draw paths, etc.

Hi, can you please share how you were able to set it up? Is there any documentation?

@typebrook
Copy link
Collaborator

typebrook commented Jul 21, 2021

So far I've seen how to set it up, but not how to interact with it. E.g.: add markers, draw paths, etc.

@SpeedFire0
I have my first try on mbtiles protocol yesterday, and it works fine.
Here is my related code (maybe it is not clear):
https://github.com/typebrook/mapstew-android/blob/3c6190b401/app/src/main/java/io/typebrook/mapstew/map/MaplibreFragment.kt#L125

Anyway, the format for each mbtiles source should be looks like:

{
  "id": "mbtilesSource",
  "tiles": [
    "mbtiles://{PATH_TO_YOUR_MBTILES}"
  ]
}

In my case, I put mbtiles in my app's interal storage for database. So PATH_TO_YOUR_MBTILES is context.getDatabasePath("test.mbtiles")

@tir38
Copy link

tir38 commented Mar 22, 2022

Am I right to understand that this is for shipping tiles with an apk. This is not about downloading tiles in-app and using later when offline as in this sample?

@wipfli wipfli reopened this Jul 2, 2022
nvanfleet pushed a commit to lyft/maplibre-gl-native that referenced this issue Jul 28, 2022
This PR is updating the version of this image's parent (`bionicbase`) to keep this image (`maplibreglnativeprivate`) up-to-date.
It will be merged if all tests pass via `/merge-skip-owners`; if tests do not pass, it will require manual intervention.

For more details please see the [docs about Automatic Updates](https://docs.lyft.net/eng/provisioningdocs/learning/automatic_updates.html).

[Here is what's changed in `bionicbase`](lyft/containers@20c7e22...389522f).

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

No branches or pull requests

8 participants