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 offline maps from with OSMDashboard? #32

Closed
dennisguse opened this issue Apr 29, 2020 · 8 comments
Closed

Download offline maps from with OSMDashboard? #32

dennisguse opened this issue Apr 29, 2020 · 8 comments

Comments

@dennisguse
Copy link
Member

Especially for less tech savy users, it would probably great to download offline maps from within OSMDashboard.
Also, I have the feeling that the initial setup of offline maps is rather complicated (not really intuitive).

Could we improve this somehow?

@pstorch
Copy link
Member

pstorch commented Apr 30, 2020

Yes, that would be a nice feature.
But not easy to implement. I remember a long discussion I was involved here: cgeo/cgeo#6072

tl;dr:

  • Only few Map providers allow direct download from within your app (OK, one would be enough for us)
  • some map providers offer download links which could be captured by app intents. But these are app specific and must me aligned with each provider to have it included on their download page. That's what I've seen for Locus Maps and Ocrux. We could "listen" on one of those URIs, but it doesn't feel right. Same has to be done for themes.

I've seen a new approach from c:geo to only download from one mapsforge mirror, which allowed downloading from within the app and doesn't need an extra theme. Maybe that's an option for the OSM Dashboard, too.

@dennisguse
Copy link
Member Author

Would it be possible to show a list of potential sources (i.e., links) and if the user chooses a source, a webview could be opened.
The we could limit the navigational freedom (just go to url-subpaths) and wait for download events?
Then we would have the selected map url and could download it within OSMDashboard.

PS: Don't know exactly if this would work :)

@pstorch
Copy link
Member

pstorch commented Apr 30, 2020

That could be done with the basic mapsforge maps. Other map providers require proper themes and then we would need to direct the user to the proper themes according to the maps provider.

@pstorch
Copy link
Member

pstorch commented Apr 30, 2020

Not pretty, but you could move around in the directories and choose a map. Then we can intercept the map URI and download in the background.
Screenshot_20200430-214758_OpenTracks_-_OSM_Dashboard

Another question is where to put it?

  • use the "Offline Map Directory" which we have right now: then this needs to be writable (which I'm not sure if that is a good idea) and chosen prior to download
  • use the internal app specific storage, but then we have two directories where to look for .map files
  • we could rename the "Offline Map Directory" to "External Map Directory" to make it clear that there is a distinction between maps shared with some other apps (external) or maps which are downloaded within the dashboard.

@dennisguse
Copy link
Member Author

Mhh.
I thought we use the offline map directory, but you are right.
I still like the idea to share the files between apps - so we could ask for permanent permission for one folder.

@pstorch
Copy link
Member

pstorch commented May 1, 2020

After thinking a while about it, it might be better to request a writable Offline Map Directory than confusing them with two different ones.

@pstorch
Copy link
Member

pstorch commented Jun 6, 2020

I have a basic working version at https://github.com/OpenTracksApp/OSMDashboard/tree/download_mapsforge_maps

But while testing the download, I see that the solution to dynamically add the .map files which can be found in the offline map directory to the menu is not a good solution. It takes longer and longer and there is no possibility to delete a map file.

I think I should move them out of the menu into a mapchooser list activity.

@pstorch
Copy link
Member

pstorch commented Jun 7, 2020

I've pushed the first working version, I'll open another ticket to rework the maps menu.

@pstorch pstorch closed this as completed Jun 7, 2020
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

2 participants