2

I have implemented maps in my react native project but in iOS case, its been observed that Apple map is visible, but I need a google map in place of apple map. I have gone through this link.

Can anyone help me with an accurate answer?

Harsh
  • 63
  • 9

1 Answers1

0

see at GitHubPage of react-native-maps :

For iOS, in addition to providing the mapStyle you will need to do the following

import MapView, { PROVIDER_GOOGLE } from 'react-native-maps'

// ...

<MapView
  provider={PROVIDER_GOOGLE}
  customMapStyle={MapStyle}
>

Then add the AirGoogleMaps directory:

https://github.com/airbnb/react-native-maps/blob/1e71a21f39e7b88554852951f773c731c94680c9/docs/installation.md#ios

An unofficial step-by-step guide is also available at https://gist.github.com/heron2014/e60fa003e9b117ce80d56bb1d5bfe9e0

Community
  • 1
  • 1
  • thanks for the answer, but there is one more case, when I am trying to install react-native-maps for latest version and react native latest version I am getting a error which is like - googlemaps.h not found, can you help to solve this issue? – Harsh Jun 08 '18 at 08:48
  • 1
    looks for me like you have this issue: https://github.com/react-community/react-native-maps/issues/2159 – PrinzAndreVonLandmann Jun 08 '18 at 09:51
  • well in mont 100% sure if i get your problem right but you should doublecheck the installation guide if you have done it right alternatively maybe one of these can help: 1."https://github.com/react-community/react-native-maps/issues/1278" 2."https://github.com/react-community/react-native-maps/issues/2270" 3."https://stackoverflow.com/questions/15021006/ – PrinzAndreVonLandmann Jun 08 '18 at 09:56
  • have you tried with same installation guide?, bcoz I have go through same process mention in installation guide but somehow it didn't work for me. :( – Harsh Jun 11 '18 at 04:43