@AntonKhorev commented on this pull request.


> +  var baseLayers = {
+    cyclosm: ["CyclOSM"],
+    cyclemap: ["CycleMap", thunderforestOptions],
+    transportmap: ["TransportMap", thunderforestOptions],
+    hot: ["HOT"],
+    mapnik: ["Mapnik", mapnikOptions]
+  };
+  baseLayers["cycle map"] = baseLayers.cyclemap;
+  var [layer, options] = baseLayers[args.layer] || baseLayers.mapnik;
+  new L.OSM[layer](options || {}).addTo(map);

Don't we have 
[layers.yml](https://github.com/openstreetmap/openstreetmap-website/blob/master/config/layers.yml)
 with all layers config? Only `mapnik` needs a special case, the rest can be 
generated from there. Maybe `"cycle map"` is also a special case, or we can 
remove spaces before looking up the layer.


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

Message ID: 
<openstreetmap/openstreetmap-website/pull/5550/review/2575006...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to