Zoom control moved to the topright corner
davvalent

davvalent commited on 2023-02-10 22:36:20
Showing 1 changed files, with 5 additions and 2 deletions.

... ...
@@ -53,6 +53,7 @@
53 53
       minZoom: 15,
54 54
       zoomDelta: 0.5,
55 55
       zoomSnap: 0.5,
56
+      zoomControl: false,
56 57
       layers: [
57 58
         baseLayer,
58 59
         faubourgLayer
... ...
@@ -114,13 +115,15 @@
114 115
       }
115 116
     }),
116 117
 
117
-    /** Controls */
118
+    /** Layers control data */
118 119
     overlayMaps = {
119 120
       "<span class=\"controles\">Plan d'expropriation</span>": faubourgLayer,
120 121
       "<span class=\"controles\">Bâtiments</span>": geoJSON,
121 122
     },
122 123
 
123
-    addControls = L.control.layers(null, overlayMaps).addTo(planDuFaubourg),
124
+    addLayerControl = L.control.layers(null, overlayMaps).addTo(planDuFaubourg),
125
+    addZoomControl = L.control.zoom({position:"topright"}).addTo(planDuFaubourg),
126
+    addScale = L.control.scale().addTo(planDuFaubourg),
124 127
     addJsonLayer = geoJSON.addTo(planDuFaubourg);
125 128
 
126 129
   planDuFaubourg.on("popupopen", () => {
127 130