I’m trying to put a circle in the center of my map. I have the following :
<MapView.Circle
center={{latitude: this.state.region.latitude, longitude: this.state.region.longitude}}
radius=1000
fillColor="rgba(0, 0, 0, 0.2)"
strokeColor="rgba(0, 0, 0, 0.2)"/>
but the circle doesn’t change when I change region while my MapView has a onRegionChange method that sets the new region
onRegionChange = (region) => {
this.setState({region: region});
}
I was having this issue on iOS.
It looks like instances of AIRMapCircle are never getting a pointer to the AIRMap. Adding
((AIRMapCircle *)subview).map = self;
to line 90 of AIRMap.m fixed this.