Reputation: 61
I want to generate a link with a gps position so that, when clicked, Osmand opens and shows the location, similar to http://maps.google.com/?q=latitude,longitude, but it should open in the app so that the offline maps are used.
Is this possible?
Upvotes: 3
Views: 205
Reputation: 7647
OsmAnd does support opening a large variety of links, such as links to Google Maps, OpenStreetMap, osmand.net and some others. However, at least on my Android 13 smartphone, those links do not open by default in OsmAnd. I have to go to the App info menu, and there under “Open by default” I can press “Add link” to pick from a list of link which ones should be opened in OsmAnd. Because this requires changing the settings on the user side, it is not really feasable for a public web app.
However, I found that on my phone, the geo:
protocol is supported by OsmAnd (and other map apps) by default. When clicking a link to a geo:${lat},${lon}
URL (or geo:${lat},${lon}?z=${zoom}
), my phone asks me which app to open the URL with, and OsmAnd appears in the list. There I can also choose to always open such URLs in OsmAnd automatically.
Upvotes: 0