IsraelHikingMap / Site

Israel Hiking Map has maps, route planning, and travel information for Israel. This repository holds the files needed for running the Israel Hiking Map site and apps.
https://israelhiking.osm.org.il/
Other
76 stars 31 forks source link

Use PMTiles for offline maps #1961

Closed zstadler closed 4 months ago

zstadler commented 4 months ago

What is the problem this feature will solve?

As the number of subscribers grow, I see an increase in the issues they have with the availability of the offline maps. Most issues are with offline maps not showing while some have SQL issues while downloading maps.

In both cases, the only available solution is to remove and re-install the application. In some cases, a data cleanup was also required.

What is the feature you are proposing to solve the problem?

Replace the use of SQLite-base MBTiles format for the offline maps with PMTiles, and avoid the need to use SQLite adapter/plugin.

What alternatives have you considered or tried?

None that I can think of...

Additional information

No response

HarelM commented 4 months ago

The following use cases needs to be considered and tested:

Also worth thinking about removing the old databases after downloading the pmtiles to reduce disk usage

HarelM commented 4 months ago

Additional consideration: When downloading with the new client, the client is requesting a files by date. This means that it might get only the IHM pmtiles files and not the contours and terrain, meaning it will operate with both pmtile and mbtiles. Code wise, this is supported right now, but I'm not sure how we want to remediate this going forward.

HarelM commented 4 months ago

I've added a state parameter to indicate that pm tiles were ever downloaded to the device. If this is not the case, it behaves similar to how the app behaves after you purchase a subscription but you haven't downloaded the files - i.e. when the app starts it prompts you to download the files. This will make the migration period much shorter hopefully.