[openstreetmap/openstreetmap-website] suggestion: geo URI handling (#2925)
Markus Göllnitz
notifications at github.com
Fri Oct 30 19:36:57 UTC 2020
Currently, the share tab on the OpenStreetMap website provides a geo URI. The website could become the receiving end as well.
a) The search currently supports of the form lat,lon, e.g. 52.6907,4.8059. If it internally stript the geo: prefix of the URI and optionally could make use of the zoom parameter z as in geo:52.6907,4.8059?z=15, the page could handle geo URIs in the search.
b) It then could use the ability to register a protocol handler via a Navigator API in JavaScript [(WHATWG § 8.9.1.3)](https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers):
`navigator.registerProtocolHandler("geo", "https://www.openstreetmap.org/search?query=%s", "open on OpenStreetMap.org");`. At least for Firefox and Opera according to the mdn/browser-compat-data [[2]](https://github.com/mdn/browser-compat-data/blob/fee6670cd7c0cce7b87b7cb67a0cc1f4a6b5566d/api/Navigator.json#L1815), as for Edge and Chrome the geo scheme is not listed. I was able to add this handler though on Chromium 86.0.4240.75 on Ubuntu.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/2925
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20201030/f5164da8/attachment.htm>
More information about the rails-dev
mailing list