Skip to content

Commit

Permalink
Update geosearch.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
bo-lu committed Nov 8, 2024
1 parent 31cde5f commit 2dcf830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/search/geosearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 2dcf830

Please sign in to comment.