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

Support off-line maps #19

Closed
geeksville opened this issue Apr 22, 2020 · 28 comments · Fixed by #489
Closed

Support off-line maps #19

geeksville opened this issue Apr 22, 2020 · 28 comments · Fixed by #489
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@geeksville
Copy link
Member

No description provided.

@geeksville geeksville added enhancement New feature or request good first issue Good for newcomers labels Apr 22, 2020
@geeksville
Copy link
Member Author

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/offline-maps-on-meshtastic/137/3

@aHVzY2g
Copy link

aHVzY2g commented Jun 11, 2020

I would suggest the usage of OsmAnd. The only job to be done would be to integrate the "aidl interface", of Osmand. https://github.com/osmandapp/Osmand/blob/master/OsmAnd/src/net/osmand/aidl/IOsmAndAidlInterface.aidl#L445

Here you can find an example for Telegram integration https://osmand.net/blog/osmand-telegram-released

@geeksville
Copy link
Member Author

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/offline-maps-on-meshtastic/137/21

@aHVzY2g
Copy link

aHVzY2g commented Jun 26, 2020

@geeksville did you already had a thought, which "OfflineMap integration" would fit the scope of the project best?

@geeksville
Copy link
Member Author

@aHVzY2g Mapbox as a really nice and easy looking API to turn on off-line maps. I just didn't call it ;-). So I'd say the "low hanging fruit" solution is for someone to just use the mapbox version.

Porting to some other API would be fine if someone wants to do that and it provides the same level of polish. But the docs for mapbox are super good and it was super easy to for me add maps with their api. the last time I looked at OsmAndroid it was much more rough - but that was for a project like 6 yrs ago (andropilot and droneshare) so it has probably gotten better.

@jetatomic
Copy link

Please consider non-urban areas when looking at map examples. Many maps which look very cool in cities end up being completely blank in areas with no roads. OpenStreetMap, which is the source OsmAnd primarily draws from, only has 1 layer (of 5) which shows useful details when there are no roads. If OSM sources are selected, please consider using the Cycle Map layer if no other robust data sources are layered over the basemap. Otherwise, people hiking might find this is all the map shows, which is the 4km surrounding my home:

Screenshot_2020-07-11 OpenStreetMap(1)

Example in the Meshtastic forum.

@chron0
Copy link

chron0 commented Aug 10, 2020

Offline Maps would seem to be a key feature for the idea of meshtastic. OsmAnd or the principle of OsmAnd could be a viable alternative, as well as having in app capability to download and store maps when online and use them when offline. QGroundControl has a similar feature like this, where you can use basically any source, vector or sat maps, create a box and it will download all resolutions you specify (and have available space).

@geeksville
Copy link
Member Author

@chron0 It might be easier to initially just turn on offline maps in our current mapbox client. If you want to work on this, here's a plausible pointer: https://docs.mapbox.com/help/troubleshooting/mobile-offline/

@chron0
Copy link

chron0 commented Aug 10, 2020

I'll have a look but, although the mapbox stack is potent/competent, I never liked their closed box model. A couple of years back I was saddling this horse the other way around: https://apollo.open-resource.org/lab:dspace - but in the end we failed at the challenge of the distributed data layer. meshtastic could proof to provide this kind of basis the other way around where we could map communication/data in a decentralized (mesh) fashion as "overlays" onto an available basemap, at least for the basic "slow" communication/data subset, not for "everything" but for the most basic/emergency/off-grid needs.

@DingoOz
Copy link

DingoOz commented Sep 7, 2020

Additional link to MapBox API calls for offline maps: https://docs.mapbox.com/android/maps/overview/offline/

@cjgemm
Copy link

cjgemm commented Jan 22, 2021

Tried this, but the downloaded maps do not work in the Meshtastic app. Osmand is the nicest non ATAC mapping app I have found.

@geeksville
Copy link
Member Author

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/can-the-app-use-other-maps/246/6

@joshbowyer
Copy link

As a "power user" of Osmand, it is definitely far ahead of ATAK. And as for data sparsity, enhanced mapping data (tiles, POIs, routing, etc) can be downloaded from opensupermaps.com and placed in Osmand's working directory. With this dataset Osmand becomes the best offline mapping software available IMO.

@Mhowser
Copy link

Mhowser commented Jan 30, 2022

@geeksville are these docs up to your standards?

https://github.com/osmdroid/osmdroid/wiki#kotlin
It would be awesome if this could be done for #6's sake as well.

@geeksville
Copy link
Member Author

Sure, if someone wants to send in a PR to do this then I think that would be great!

@Mhowser
Copy link

Mhowser commented Jan 31, 2022

I am trying to commission a person on Fiverr to do this.

@joshbowyer
Copy link

I dont know how Fiverr works but is it something where users like me could donate to a bounty pool? I personally know some other people aside from just myself who would be willing to pay for this to be made

@joshbowyer
Copy link

Have you had any luck?

@Mhowser
Copy link

Mhowser commented Mar 19, 2022

No, all devs that I contacted there basically told me its too complicated. I could ask more devs but most of them are out of my budget.

@joshbowyer
Copy link

joshbowyer commented Mar 19, 2022 via email

@Mhowser
Copy link

Mhowser commented Mar 20, 2022

My budget was around 200 at the time, but since then I had to spend over half my savings due to mandatory life style changes. So I'm afraid I won't be able to contribute for quite a while.

@joshbowyer
Copy link

I am looking to put forward a few thousand.

Email me at mke_josh@protonmail.com and we can discuss more

@Mhowser
Copy link

Mhowser commented Mar 20, 2022

@andrekir @geeksville I highly suggest you take advantage of this opportunity.

@PWRxPSYCHO
Copy link
Member

PWRxPSYCHO commented Mar 20, 2022

I ended up making a prototype of offline-maps using MapBox. It was merged in with PR #391 and was linked to Issue #359 .

It is a "developer only feature" right now and is very limited in its functionality.

The main issue is MapBox's API limits for the free tier, as well as the Terms of Service which prevents users from downloading the tilesets and keeping them stored permanently. You must fetch the tilesets before going into a region with no cell coverage. It essentially "pre-loads" the tilesets in cache and allows you to view the specified region when you need it. (As long as the application is still open and has not been closed)

Ideally, a transition away from MapBox would be the best solution to this problem. But that has its own set of issues, namely performance on older devices, actually setting it up in the application, and other unknowns.

@joshbowyer
Copy link

Please look at Osmand/OSM. The issue youre running into is the same issue PureMaps has been having; due to limited API calls theyve had to remove nearly every tile server they had.

@PWRxPSYCHO
Copy link
Member

I could probably take this on, but it won't be a quick turnaround as I would be doing this in my free time lol. I would also need to talk with the other devs on the project and see if this would be a viable solution before I spend too much time working on something like this.

@chron0
Copy link

chron0 commented Mar 20, 2022

Something like Meshtastic will only unfold its true potential when it can work without any online dependency. So integrated offline-maps coming from OSM and/or re-using OSMAnd map downloads and serving it locally in app, or providing its own tileserver that the client app can use as a drop-in replacement would be awesome.

@prurigro
Copy link

prurigro commented Aug 5, 2022

Would interfacing with the osmand API be a valid solution?

This is an example app, and the readme has the list of commands with their arguments and explanations: https://github.com/osmandapp/osmand-api-demo/tree/master/OsmAnd-api-sample

It seems like addMapMarker(), updateMapMarker() and removeMapMarker() could be used to draw, update and remove the locations of other nodes, which would be great for initial functionality. It also seems like there are enough features available to extend the functionality quite a bit down the road.

If osmand is available as an option for mapping, it might make sense to replace the mapbox functionality with a list of nodes and their GPS coordinates? The app would be fully functional without the internet, and the coordinates would be easy to reference and punch into other GPS devices.

EDIT: Apparently this file helps with integration https://github.com/osmandapp/Osmand/blob/master/OsmAnd/src/net/osmand/aidl/IOsmAndAidlInterface.aidl

@PWRxPSYCHO PWRxPSYCHO linked a pull request Oct 8, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants