[openstreetmap/openstreetmap-website] Add geo URI handler registration on link interaction (PR #5968)
Anton Khorev
notifications at github.com
Tue Aug 26 15:52:27 UTC 2025
@AntonKhorev commented on this pull request.
> @@ -227,6 +229,16 @@ L.OSM.share = function (options) {
const precision = 5 * Math.pow(10, Math.floor(Math.LOG10E * Math.log(scale)) - 2);
return precision * Math.ceil(scale / precision);
}
+
+ function askToHandleGeoURI() {
+ if (sessionStorage.getItem("geoHandlerAsked")) return;
+ try {
+ navigator.registerProtocolHandler("geo", "/?geouri=%s");
+ sessionStorage.setItem("geoHandlerAsked", "registered");
"registered" gets recorded even if the registration prompt is closed without registering anything.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5968#pullrequestreview-3156304049
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5968/review/3156304049 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250826/f51d7ed0/attachment-0001.htm>
More information about the rails-dev
mailing list