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

Martin Ždila notifications at github.com
Fri Feb 7 14:42:26 UTC 2025


@zdila commented on this pull request.



> @@ -11,6 +15,40 @@ L.extend(L.LatLngBounds.prototype, {
   }
 });
 
+if (OSM.MAPTILER_KEY) {
+  L.OpenMapTiles = L.MaplibreGL.extend({
+    options: {
+      maxZoom: 23,
+      style: "https://api.maptiler.com/maps/openstreetmap/style.json?key=" + OSM.MAPTILER_KEY
+    },
+    onAdd: function (map) {
+      var supportedLanguages = "am,ar,az,be,bg,br,bs,ca,co,cs,cy,da,de,el,en,eo,es,et,eu,fi,fr,fy,ga,gd,he,hi,hr,hu,hy,id,is,it,ja,ja_kana,ja_rm,ja-Latn,ja-Hira,ka,kk,kn,ko,ko-Latn,ku,la,lb,lt,lv,mk,mt,ml,nl,no,oc,pl,pt,rm,ro,ru,sk,sl,sq,sr,sr-Latn,sv,ta,te,th,tr,uk,zh".split(",");

List of supported languages has been moved to `@maptiler/maplibre-gl-omt-language` package. This can be also discussed in follow-up tickets if necessary.

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

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


More information about the rails-dev mailing list