[openstreetmap/openstreetmap-website] Add PWA geo protocol handler (PR #5736)

Anton Khorev notifications at github.com
Tue Mar 18 14:21:17 UTC 2025


@AntonKhorev commented on this pull request.



> @@ -80,6 +80,10 @@ OSM = {
 
     const hash = OSM.parseHash(location.hash);
 
+    const geoURI = Object.fromEntries(new URLSearchParams(
+      params.geouri?.replaceAll(/[?;]/g, "&")?.replaceAll(":", "=")

Looks like the example I copied from Wikipedia is wrong because `crs` values can't contain `:`.

```
crsp          = ";crs=" crslabel
crslabel      = "wgs84" / labeltext
labeltext     = 1*( alphanum / "-" )
alphanum      = ALPHA / DIGIT
```

Nonetheless other parameters can contain `:`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5736#discussion_r2001173709
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5736/review/2694779309 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250318/b7e95b11/attachment.htm>


More information about the rails-dev mailing list