[openstreetmap/openstreetmap-website] Migrate `/export/embed.html` from leaflet to maplibre (PR #6804)
Minh Nguyễn
notifications at github.com
Thu Mar 5 17:31:33 UTC 2026
@1ec5 commented on this pull request.
> @@ -0,0 +1,123 @@
+OSM.MapLibre.AttributionControl = class extends maplibregl.AttributionControl {
At the embed’s default size of 425×350, the ℹ️ will appear and automatically collapse by default. This will be a change from the existing Leaflet implementation. Personally, I’d be OK with that because we’d still comply with the guidelines by expanding the control by default. However, we also rely on the same control to show the equally important link to /fixthemap, so I’d lean towards expanding the control persistently. We can always revisit this choice if there’s a compelling reason for the ℹ️.
> + if (this._credit) {
+ attribHTML += this._credit.donate ? " ♥️ " : ". ";
+ attribHTML += this._buildCreditHtml(this._credit);
+ }
+
+ attribHTML += ". ";
+
+ const termsLink = document.createElement("a");
+ termsLink.href = "https://wiki.osmfoundation.org/wiki/Terms_of_Use";
+ termsLink.target = "_blank";
+ termsLink.rel = "noopener noreferrer";
+ termsLink.textContent = OSM.i18n.t("javascripts.map.website_and_api_terms");
+ attribHTML += termsLink.outerHTML;
If I’m not mistaken, with the expanded version of the attribution control, if the attribution is too long to fit on a single line, it’ll truncate (…) by default until you hover over it, at which point it’ll wrap onto multiple lines. That’s reasonable behavior and will probably only affect a small number of locales.
Our attribution guidelines only require attribution. My current assumption is that we don’t need to link to the Terms of Use here. Someone viewing the embed on a third-party site is only minimally using the OSM site and tile server and not using the API at all. As soon as they do anything more substantial by visiting the main site, they’ll be covered by #6610, #6791, or any existing notice about the terms. The LWG hasn’t communicated to me that we need to extend this to the embed.
I’d also hold off on introducing a ❤️ Donate link into third-party sites. It would be a power move for sure. We can always introduce it later if we change our minds. I wouldn’t want that to hold up the MapLibre migration.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6804#discussion_r2891303936
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6804/review/3898351140 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260305/33952186/attachment-0001.htm>
More information about the rails-dev
mailing list