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

Minh Nguyễn notifications at github.com
Sun Jun 4 16:28:29 UTC 2023


@1ec5 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(",");

`name:ja_kana` and `name:ja_rm` are both [documented on the wiki as being deprecated](https://wiki.openstreetmap.org/wiki/Multilingual_names#Japan), although they are still in use to some extent. Is it a good idea to support these nonstandard language codes as part of the website?

> @@ -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(",");

This list doesn’t include the languages added to OpenMapTiles openmaptiles/openmaptiles#1477. I assume that’s because the MapTiler-hosted tiles are on OpenMapTiles v3.14, whereas this change is still waiting to be released. Is there a way to automate this list so that the website maintainers won’t have to remember to update it based on OpenMapTiles’ release schedule and MapTiler’s upgrade schedule?

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

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


More information about the rails-dev mailing list