flutter-maplibre-gl icon indicating copy to clipboard operation
flutter-maplibre-gl copied to clipboard

How to create caches.db file?

Open BorisGautier opened this issue 1 year ago • 3 comments

For the function installOfflineMapTiles, we need to provide it a tiles database, can't file any tutorial about this, how to create this file?

BorisGautier avatar Apr 14 '23 23:04 BorisGautier

[android only]

The creation of a database is not yet documented so everything of this is speculation.

I think you can create a cachedb by creating offline region in a test app, then recover it by navigating there: /data/data/<your android app identifier>/files/mbgl-offline.db. And if i'm not wrong just load that file.

I don't know if there are easier ways to do it

mariusvn avatar Apr 18 '23 12:04 mariusvn

[android only]

The creation of a database is not yet documented so everything of this is speculation.

I think you can create a cachedb by creating offline region in a test app, then recover it by navigating there: /data/data/<your android app identifier>/files/mbgl-offline.db. And if i'm not wrong just load that file.

I don't know if there are easier ways to do it

Okay thank you very much I will try

BorisGautier avatar Apr 21 '23 10:04 BorisGautier

Unfortunately I don't remember exactly how it's done, but the mapbox repo links to a mapbox page with instructions (see https://github.com/flutter-mapbox-gl/maps/blob/61b435e0143d8c41b5d1cee138cf25c00a013919/README.md?plain=1#L159), but I think I remember that that page changed/was redirected at some point. Maybe you can still find the old documentation from Mapbox on this. They might have open source tooling for this task.

m0nac0 avatar Apr 23 '23 03:04 m0nac0