소스 검색

fix: remove zoom controls and Leaflet attribution from map

neyrogovnarik 1 개월 전
부모
커밋
f732c3187f
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  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)