Can not change region through the props 'region'?
I used the props 'region' to change the map region dynamically. But when i use react-native-map-clustering, when i changed it from redux, it immediately reset the region to the initial region. So has any one faced this before? And what was the solution? THank all
Did you solve the issue?
What did you do?
I've solved the issue setting a useRef hook on MapView and then calling to onRegionChangeComplete() method:
const mapRef = useRef();
<MapView
ref={mapRef}
...
/>
mapRef.current.onRegionChangeComplete({
latitude: -34.6077514,
longitude: -58.3852248,
latitudeDelta: 0.1,
longitudeDelta: 0.1
})