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

Download map region to offline cache #215

Open
ranger81 opened this issue Nov 20, 2021 · 7 comments
Open

Download map region to offline cache #215

ranger81 opened this issue Nov 20, 2021 · 7 comments

Comments

@ranger81
Copy link

HI,
first of all thanks for your app, it's great. However, I have an enhancement request. It would be awesome, if you could download a selected region "automatically" to the map cache. Currently you have to scroll through the tiles in various zoom levels. If I want to download the map for a larger area, this is quite difficult.

Would it be possible to implement such "area download" feature, like the Google Maps app has (see attached screenshot)?

Thanks

IMG_1089

@vincentneo
Copy link
Collaborator

I could vaguely remember that OpenStreetMap discourages that on their APIs. Apple Maps API don't allow such batch downloads too. Not sure about the other map tiles though.

@noah10
Copy link

noah10 commented Apr 13, 2022

I'd really like to see this feature as well. As it stands, offline caching doesn't really work - if I'm planning a trip I can't tell if I have all of the information I need cached or not (and often only find out I don't once I get into the trip and find I'm missing map data). Allowing it to be specified and downloaded in advance would give me the security of knowing I won't end up mapless in the wilderness. And other than the usual points about query limits I didn't see anything in the Overpass (OpenStreetMap) API documentation against this. (And if hitting the query limits is a concern then limiting the maximum size of the bounding box you can explicitly cache seems like a reasonable compromise.)

@ranger81
Copy link
Author

@noah10 Because of this missing feature I decided to switch to https://github.com/organicmaps/organicmaps

@noah10
Copy link

noah10 commented Apr 13, 2022

Thanks for the tip. Unfortunately I see that it doesn't yet support GPX import, which is a must for me, so I guess I've either got to get them to add that or Open GPX to add proper map downloading. :-)

@vincentneo
Copy link
Collaborator

I'd really like to see this feature as well. As it stands, offline caching doesn't really work - if I'm planning a trip I can't tell if I have all of the information I need cached or not (and often only find out I don't once I get into the trip and find I'm missing map data). Allowing it to be specified and downloaded in advance would give me the security of knowing I won't end up mapless in the wilderness. And other than the usual points about query limits I didn't see anything in the Overpass (OpenStreetMap) API documentation against this. (And if hitting the query limits is a concern then limiting the maximum size of the bounding box you can explicitly cache seems like a reasonable compromise.)

@noah10 thanks for your interest. I haven't heard of Overpass API prior, so definitely that's not something that we are using here.

We are using OpenStreetMap tiles, which it's policy can be found here https://operations.osmfoundation.org/policies/tiles/
For which, a part of it writes:

Bulk Downloading

Bulk downloading is strongly discouraged. Do not download tiles unnecessarily.

In particular, downloading an area of over 250 tiles at zoom level 13 or higher for offline or later usage is forbidden. These tiles are generally not available (cached) on the server in advance, and have to be rendered specifically for those requests, putting an unjustified burden on the available resources.

Now, knowing that an open source app exists with such a feature, with the recommendation of @ranger81, I do think we could look into how/which tile server it implements that can bring in such a feature.

@ranger81
Copy link
Author

@noah10 You can import .KML files. There are converter tools out there to convert GPX to KML.
@vincentneo Sounds awesome if that feature would be added.

@noah10
Copy link

noah10 commented Apr 13, 2022

@vincentneo Thanks for the link to the bulk downloading policy. I had been looking at https://wiki.openstreetmap.org/wiki/Overpass_API#Public_Overpass_API_instances , which is where I only saw the the query limit info. And regarding the 250 tile/zoom level 13 limit, a first cut at the implementation could use lower zoom levels for larger areas and higher zoom levels for smaller ones. Future iterations (assuming there's enough interest) could be smarter and use higher zoom levels for more populated parts of the download area and lower zoom levels for less populated ones.
And @ranger81 thanks for the KML info. I glanced at that and for some reason thought it was only available for Android, but now I see it's also for iPhone. I'll give that a try!

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

3 participants