@AntonKhorev commented on this pull request.


> +    function update3dMapUrl() {
+      var el = document.getElementById("terrain_3d_url");
+
+      if (el) {
+        var c = map.getCenter();
+        var zoom = map.getZoom() - 1;
+        var precision = Math.ceil(((zoom * Math.LN2) + Math.log(256 / 360)) / 
Math.LN10);
+
+        el.href = el.dataset.hrefTemplate
+          .replace("{lang}", I18n.locale.replace(/-.*/, ""))
+          .replace("{pos}", zoom + "/" + c.lat.toFixed(precision) + "/" + 
c.lng.toFixed(precision) + "/30.00/60.00");
+      }
+    }
+
+    map._update3dMapUrl = update3dMapUrl;
+    setTimeout(update3dMapUrl);
+    map.on("moveend", update3dMapUrl);

You don't need any of this added in this commit if you remove it in the next 
one.

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

Message ID: 
<openstreetmap/openstreetmap-website/pull/4042/review/2604076...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to