Skip to content

Commit 7a24e4d

Browse files
Nick ItalianoExilz
authored andcommitted
Added google map type only check
1 parent 64d42d8 commit 7a24e4d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

components/MapView.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ const MAP_TYPES = {
3232
NONE: 'none',
3333
};
3434

35+
const GOOGLE_MAPS_ONLY_TYPES = [
36+
MAP_TYPES.TERRAIN,
37+
MAP_TYPES.NONE,
38+
];
39+
3540
const viewConfig = {
3641
uiViewClassName: 'AIR<provider>Map',
3742
validAttributes: {
@@ -568,6 +573,10 @@ class MapView extends React.Component {
568573
onMapReady: this._onMapReady,
569574
onLayout: this._onLayout,
570575
};
576+
if (Platform.OS === 'ios' && props.provider === ProviderConstants.PROVIDER_DEFAULT
577+
&& GOOGLE_MAPS_ONLY_TYPES.includes(props.mapType)) {
578+
props.mapType = MAP_TYPES.standard;
579+
}
571580
props.handlePanDrag = !!props.onPanDrag;
572581
} else {
573582
props = {

0 commit comments

Comments
 (0)