Anoop Joshi P
Anoop Joshi P

Reputation: 25527

Google map is not loading with the new API key

I'm using 'react-native-maps' to show a map inside a page. For that I've configured an API key in android manifest

<meta-data android:name="com.google.android.geo.API_KEY" android:value="my key here"/>

Its working fine.

Now I Got my new API key from the client.When I configured with the new key, Map is not loading at all. Everything else(places auto fill, reverse Geo coding) etc are working fine. IS there any service I need to enable on the client's Google Cloud Platform Console.?

Upvotes: 0

Views: 1686

Answers (1)

evan
evan

Reputation: 5691

This likely means that your client's API key:

(a) is restricted with HTTP referrers or by IP address. To load a Google map from an Android app, you need to secure this key with Android restrictions. So your client will have to create a second API key and restrict each accordingly.

(b) belongs to a project that has the Maps SDK for Android disabled. Enabling it will fix it.

Hope this helps!

Upvotes: 1

Related Questions