Skip to content

Commit ea393c2

Browse files
computerjazzchristopherdro
authored andcommitted
[MapView] revert initialRegion change (react-native-maps#1613)
Reverts JS changes made in react-native-maps#1563 which broke initialRegion on iOS, causing the map to display a region centered around 0, 0.
1 parent c29b2bf commit ea393c2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/components/MapView.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,10 @@ class MapView extends React.Component {
466466
const { layout } = e.nativeEvent;
467467
if (!layout.width || !layout.height) return;
468468
if (this.state.isReady && !this.__layoutCalled) {
469-
const { region, initialRegion } = this.props;
469+
const region = this.props.region || this.props.initialRegion;
470470
if (region) {
471471
this.__layoutCalled = true;
472472
this.map.setNativeProps({ region });
473-
} else if (initialRegion) {
474-
this.__layoutCalled = true;
475-
this.map.setNativeProps({ initialRegion });
476473
}
477474
}
478475
if (this.props.onLayout) {

0 commit comments

Comments
 (0)