From 0d62312e37c6735daa642b3c1d7f2251493330f6 Mon Sep 17 00:00:00 2001 From: Nick Italiano Date: Mon, 24 Oct 2016 15:07:14 -0700 Subject: [PATCH] Added google map type only check --- components/MapView.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/MapView.js b/components/MapView.js index 4267a475d..2250d1591 100644 --- a/components/MapView.js +++ b/components/MapView.js @@ -32,6 +32,11 @@ const MAP_TYPES = { NONE: 'none', }; +const GOOGLE_MAPS_ONLY_TYPES = [ + MAP_TYPES.TERRAIN, + MAP_TYPES.NONE, +]; + const viewConfig = { uiViewClassName: 'AIRMap', validAttributes: { @@ -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 = {