@HolgerJeromin commented on this pull request.
> - new L.OSM.CycleMap(thunderforestOptions).addTo(map);
- } else if (args.layer === "transportmap") {
- new L.OSM.TransportMap(thunderforestOptions).addTo(map);
- } else if (args.layer === "hot") {
- new L.OSM.HOT().addTo(map);
- } else {
- new L.OSM.Mapnik(mapnikOptions).addTo(map);
- }
+ var baseLayers = {
+ cyclosm: ["CyclOSM"],
+ cyclemap: ["CycleMap", thunderforestOptions],
+ transportmap: ["TransportMap", thunderforestOptions],
+ hot: ["HOT"],
+ mapnik: ["Mapnik", mapnikOptions]
+ };
+ baseLayers["cycle map"] = baseLayers.cyclemap;
`const` defines only the variable. Ii does not prevent changing the properties
of the object.
But yes, changing all `var` into `let`/`const` would be good because they work
with much less surprise.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5550#discussion_r1929773940
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5550/review/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev