@hlfan commented on this pull request.


> +    map = new maplibregl.Map({
+      container: "map",
+      style: OSM.MapLibre.Styles.Mapnik,
       attributionControl: false,
-      zoomControl: false
-    }).addLayer(new L.OSM.Mapnik());
+      locale: OSM.MapLibre.Locale,
+      rollEnabled: false,
+      dragRotate: false,
+      pitchWithRotate: false,
+      bearingSnap: 180,
+      maxPitch: 0,
+      center: OSM.home ? [OSM.home.lon, OSM.home.lat] : [0, 0],
+      zoom: OSM.home ? defaultHomeZoom : 0
+    });

An extra class for configuration seems overkill, there are simpler ways to keep 
it DRY:

```suggestion
    map = new maplibregl.Map(OSM.MapLibre.defaultSecondaryMapOptions);
```

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

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

Reply via email to