<p></p>
<p><b>@1ec5</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4042#discussion_r1216872380">app/assets/javascripts/leaflet.map.js</a>:</p>
<pre style='color:#555'>> @@ -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(",");
</pre>
<p dir="auto"><code class="notranslate">name:ja_kana</code> and <code class="notranslate">name:ja_rm</code> are both <a href="https://wiki.openstreetmap.org/wiki/Multilingual_names#Japan" rel="nofollow">documented on the wiki as being deprecated</a>, 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?</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4042#discussion_r1216877551">app/assets/javascripts/leaflet.map.js</a>:</p>
<pre style='color:#555'>> @@ -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(",");
</pre>
<p dir="auto">This list doesn’t include the languages added to OpenMapTiles <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1533853604" data-permission-text="Title is private" data-url="https://github.com/openmaptiles/openmaptiles/issues/1477" data-hovercard-type="pull_request" data-hovercard-url="/openmaptiles/openmaptiles/pull/1477/hovercard" href="https://github.com/openmaptiles/openmaptiles/pull/1477">openmaptiles/openmaptiles#1477</a>. 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?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4042#pullrequestreview-1461270636">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKFQJ4PXHBOF2UM5YDXJSZS3ANCNFSM6AAAAAAYLUCIYI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOWXKUCAECSSQUA7JDXJSZS3A5CNFSM6AAAAAAYLUCIYKWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTSXDE4GY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4042/review/1461270636</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4042#pullrequestreview-1461270636",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4042#pullrequestreview-1461270636",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>