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 12, 2024
1 parent 0179401 commit 460f6ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/search/geosearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ const GeoSearch = (
};

const selectResult = (result: SearchResult | undefined) => {
map.setMinZoom(4);
resetMapToInitialState();
if(image!==null){
map.removeLayer(image);
Expand Down Expand Up @@ -301,6 +302,7 @@ const GeoSearch = (
};

const setMapView=(center, bounds)=>{
console.log(const zoom = map.getBoundsZoom(bounds, true));
//map.fitBounds(bounds);
setTimeout(()=>map.setView(center, map.getZoom()>4?4:map.getZoom()), 200);
}
Expand Down

0 comments on commit 460f6ec

Please sign in to comment.