Explorar el Código

fix: remove zoom controls and Leaflet attribution from map

neyrogovnarik hace 1 mes
padre
commit
f732c3187f
Se han modificado 1 ficheros con 4 adiciones y 5 borrados
  1. 4 5
      frontend/src/lib/map.ts

+ 4 - 5
frontend/src/lib/map.ts

@@ -54,13 +54,12 @@ export function createLeafletMapProvider(): MapProvider {
   return {
     async init(container, center, zoom) {
       try {
-        map = L.map(container, { zoomControl: true }).setView(
-          [center[1], center[0]],
-          zoom,
-        )
+        map = L.map(container, {
+          zoomControl: false,
+          attributionControl: false,
+        }).setView([center[1], center[0]], zoom)
 
         L.tileLayer(TILE_URL, {
-          attribution: TILE_ATTR,
           maxZoom: 19,
         }).addTo(map)