From 2dcf830175ca2ac7f74f0fcea44cb1e042d9c0a6 Mon Sep 17 00:00:00 2001 From: Bo Lu Date: Fri, 8 Nov 2024 11:00:52 -0500 Subject: [PATCH] Update geosearch.tsx --- src/components/search/geosearch.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/search/geosearch.tsx b/src/components/search/geosearch.tsx index 586d3db..44306d4 100644 --- a/src/components/search/geosearch.tsx +++ b/src/components/search/geosearch.tsx @@ -253,9 +253,9 @@ const GeoSearch = ( //setMapView(center, bounds); const padding = window.innerWidth < 768 ? [20, 20] : [50, 300]; map.fitBounds(L.geoJSON(data).getBounds(), { paddingTopLeft: [padding[0], padding[1]], paddingBottomRight: [50, 50] }); + map.panBy([-250, 0]); setTimeout(() => { new L.geoJSON(data).addTo(map); - map.panBy([-300, 0]); }, 200); } } else{