Warm tip: This article is reproduced from stackoverflow.com, please click
encoding geolocation html latitude-longitude progressive-web-apps

How to store a Geolocation in HTML?

发布于 2020-03-29 21:03:42

On my website I want to share a geolocation on which mobile users can click on and then navigation to this location using the users preferred maps app installed on their device.

So I'm aiming to be independent of any maps provider and hence don't want to provide a Link to the API of such. I simply want to encode the longitude and latitude values in a way the user can easily work with.

Any ideas?

Questioner
Jan
Viewed
52
PaulS 2020-01-31 19:17

You should try using the Geo URI scheme, where a link could look like this:

<a href="geo:37.786971,-122.399677">Map</a>