[openstreetmap/openstreetmap-website] Add OpenMapTiles vector map (PR #4042)

Minh Nguyễn notifications at github.com
Sat Mar 1 17:15:39 UTC 2025


@1ec5 commented on this pull request.



> +
+      var copyright = I18n.t("javascripts.map.copyright_text", { copyright_link: copyright_link });
+
+      var openmaptiles_link = I18n.t("javascripts.map.openmaptiles", {
+        openmaptiles_url: "https://openmaptiles.org/",
+        maptiler_url: "https://www.maptiler.com/"
+      });
+
+      var terms = $("<a>", {
+        href: "https://wiki.osmfoundation.org/wiki/Terms_of_Use",
+        text: I18n.t("javascripts.map.website_and_api_terms")
+      }).prop("outerHTML");
+
+      this.baseLayers.push(new L.OpenMapTiles({
+        attribution: copyright + ". " + openmaptiles_link + ". " + terms,
+        code: "V",

I think it’s just based on the name of the layer, using whatever letter is available and unlikely to clash with the others. OpenHistoricalMap’s fork has also assigned [its own codes](https://github.com/OpenHistoricalMap/ohm-website/blob/ad4ea829a7f794a456ef5c1484e977653cd9f7c3/app/assets/javascripts/leaflet.map.js#L81), currently J, O, R, and W, but there hasn’t been a conflict because some of OSM’s featured layers have been removed. The only risk from reusing a previously assigned letter is that some old links to the old layer will now point to the new layer, but these links have been falling back to the Standard layer anyways.

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

Message ID: <openstreetmap/openstreetmap-website/pull/4042/review/2652530892 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250301/d9c9883f/attachment.htm>


More information about the rails-dev mailing list