[openstreetmap/openstreetmap-website] Add PWA geo protocol handler (PR #5736)
Marwin Hochfelsner
notifications at github.com
Sat Mar 1 01:31:34 UTC 2025
### Description
This PR adds a geo protocol handler in the web manifest and the functionality for parsing in mapParams.
We can't directly parse it as it arrives wrapped in `encodeURIComponent`,
`geo:48.410,12.060?z=9` would be handled as https://www.openstreetmap.org/?geouri=geo%3A48.410%2C12.060%3Fz%3D9
This also includes a heuristic zoom fallback based on the precision.
### How has this been tested?
With `navigator.registerProtocolHandler`, which can be included later to settle #1123 (I don't know where to put it).
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5736
-- Commit Summary --
* Add PWA geo protocol handler
-- File Changes --
M app/assets/favicons/manifest.json.erb (8)
M app/assets/javascripts/osm.js.erb (7)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5736.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5736.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5736
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5736 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250228/6ab6225e/attachment-0001.htm>
More information about the rails-dev
mailing list