diff --git a/backend/requirements.txt b/backend/requirements.txt index 8f02d27..3c16605 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -13,4 +13,5 @@ black isort huggingface_hub datasets -transformers \ No newline at end of file +transformers +pydantic[email] \ No newline at end of file diff --git a/dashboard/app.js b/dashboard/app.js index 1669f72..797992e 100644 --- a/dashboard/app.js +++ b/dashboard/app.js @@ -320,6 +320,25 @@ function App(){ window.open(`https://www.google.com/maps/search/?api=1&query=${lat},${lng}`, '_blank'); }; + const navigateToLocation = (r) => { + const map = mapRef.current; + if (!map || !r.location) return; + + const { lat, lng } = r.location; + const currentZoom = map.getZoom(); + const targetZoom = 20; // Maximum zoom level for focusing on a specific location + + // First zoom out a bit for animation effect, then zoom to target + map.flyTo([lat, lng], targetZoom, { + animate: true, + duration: 1.5, + easeLinearity: 0.25 + }); + + // Also set the selected item to show details + setSelected(r); + }; + return (