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

Marwin Hochfelsner notifications at github.com
Thu Mar 19 12:07:03 UTC 2026


@hlfan commented on this pull request.

No need to be sorry for prioritising your thesis!
If you insist, though, here's some food for thought.

> +    attribHTML += termsLink.outerHTML;
+
+    // check if attribution string is different to minimize DOM changes
+    if (attribHTML === this._attribHTML) return;
+
+    this._innerContainer.innerHTML = attribHTML;
+    this._attribHTML = attribHTML;
+    this._updateCompact();
+
+    // Update report link href after initial render
+    if (this._includeReportLink) {
+      this._updateReportLink();
+    }
+  }
+
+  _buildCreditHtml(credit) {

This function seems to be unavailable for third-party layers?

> @@ -107,6 +107,7 @@
   layerId: "shortbread"
   nameId: "shortbread"
   wiki: "https://wiki.openstreetmap.org/wiki/Shortbread"
+  canEmbed: true

Shouldn't the Maptiler OMT layer also be embeddable now?

>  
-    this._container.innerHTML =
-      this._container.innerHTML
-        .replace("{x}", this._map.getCenter().lat)
-        .replace("{y}", this._map.getCenter().lng)
-        .replace("{z}", this._map.getZoom());
+  if (args.has("marker")) {
+    const markerCoords = args.get("marker").split(",").map(parseFloat);
+    new maplibregl.Marker({ color: "#7ebc6f" })

We already include the "agreed-upon" marker?
```suggestion
    new OSM.MapLibre.Marker({ color: "#9cef11" })
```

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

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


More information about the rails-dev mailing list