diff --git a/src/App.tsx b/src/App.tsx
index a0044d3..06edc38 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -207,7 +207,7 @@ export default function App() {
-
+
{
+ if (mapView) {
+ mapView.goTo(result.extent);
+ }
+ });
+ }, [filter, mapView]);
return (
<>
diff --git a/src/components/MapContainer.tsx b/src/components/MapContainer.tsx
index 4859265..a798930 100644
--- a/src/components/MapContainer.tsx
+++ b/src/components/MapContainer.tsx
@@ -35,16 +35,24 @@ const statewide = new Extent({
},
});
-export const MapContainer = ({ onClick }: { onClick?: __esri.ViewImmediateClickEventHandler }) => {
+export const MapContainer = ({
+ onClick,
+ bottomPadding,
+}: {
+ onClick?: __esri.ViewImmediateClickEventHandler;
+ bottomPadding: number;
+}) => {
const mapNode = useRef(null);
const mapComponent = useRef(null);
const mapView = useRef();
const clickHandler = useRef();
const [selectorOptions, setSelectorOptions] = useState(null);
- console.log('rendering MapContainer');
const { setMapView } = useMap();
const isDrawing = useViewLoading(mapView.current);
- console.log('isDrawing', isDrawing);
+
+ if (mapView.current && bottomPadding) {
+ mapView.current.padding.bottom = bottomPadding;
+ }
// setup the Map
useEffect(() => {