Skip to content

Commit

Permalink
Added google map type only check
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Italiano committed Oct 24, 2016
1 parent 0ce4b3e commit 0d62312
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions components/MapView.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ const MAP_TYPES = {
NONE: 'none',
};

const GOOGLE_MAPS_ONLY_TYPES = [
MAP_TYPES.TERRAIN,
MAP_TYPES.NONE,
];

const viewConfig = {
uiViewClassName: 'AIR<provider>Map',
validAttributes: {
Expand Down Expand Up @@ -498,6 +503,10 @@ class MapView extends React.Component {
onMapReady: this._onMapReady,
onLayout: this._onLayout,
};
if (Platform.OS === 'ios' && props.provider === ProviderConstants.PROVIDER_DEFAULT
&& GOOGLE_MAPS_ONLY_TYPES.includes(props.mapType)) {
props.mapType = MAP_TYPES.standard;
}
props.handlePanDrag = !!props.onPanDrag;
} else {
props = {
Expand Down

0 comments on commit 0d62312

Please sign in to comment.