[openstreetmap/openstreetmap-website] Migrate `/export/embed.html` from leaflet to maplibre (PR #6804)

Minh Nguyễn notifications at github.com
Thu Feb 12 06:54:11 UTC 2026


@1ec5 commented on this pull request.



> +  const attribution = new OSM.MapLibre.AttributionControl({
+    credit: layerConfig.credit,
+    includeReportLink: true
+  });
+  map.addControl(attribution, 'bottom-right');
 
-  _update: function () {
-    L.Control.Attribution.prototype._update.call(this);
+  const position = document.documentElement.dir === "rtl" ? "top-left" : "top-right";
+  const navigationControl = new OSM.MapLibre.NavigationControl();
+  map.addControl(new OSM.MapLibre.CombinedControlGroup([navigationControl]), position);

Does this actually flip the direction if your browser and/or site preferences specify a right-to-left language like Arabic or Hebrew? In cursory testing, I’m finding that the embed _code_ respects the site preference as far as the hard-coded “View Larger Map” link is concerned, but the iframe within it only respects the browser preference. And the page never sets a `lang` or `dir` tag or localizes the “OpenStreetMap Embedded” title. Only the attribution string gets localized through JavaScript.

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

Message ID: <openstreetmap/openstreetmap-website/pull/6804/review/3789017036 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260211/bfb3aceb/attachment.htm>


More information about the rails-dev mailing list