@tomhughes requested changes on this pull request.


> @@ -5,3 +5,26 @@ OSM.MapLibre.Locale = {
   "NavigationControl.ZoomOut": OSM.i18n.t("javascripts.map.zoom.out"),
   "Popup.Close": OSM.i18n.t("javascripts.map.popup.close")
 };
+
+OSM.MapLibre.setMapLanguage = function (map) {
+  if (!map.style.loaded()) {
+    map.once("load", () => OSM.MapLibre.setMapLanguage(map));
+    return;
+  }
+
+  const supportedLanguages = map.style.getLanguage();

There is no `getLanguage` function on the style so this is erroring?

The old code used `maplibregl.Map.prototype.supportedLanguages` to get the list 
of supported languages.

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

Message ID: 
<openstreetmap/openstreetmap-website/pull/6683/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to