Closed rachelnicole closed 6 years ago
@c-w so what happened was changing the state wasn't updating the map, moveMapToNewLocation was only applicable for changing placeId so there's a new function moveMapToBoundingBox which we're calling when the button is clicked, and passing through the original bbox value with this.refs.map.leafletElement.fitBounds(bounds);
the leafletElement was the key to this as i realized it was the thing that's actually handling the map movement, watching for state changes wasn't hooked up.
This was a lot to figure out, originally I thought that updating the state for bbox and zoom would have automatically changed the way the map moves, but that wasn't the case.
Not ready for review yet, just opening up the PR to track things for myself.