AirMapView icon indicating copy to clipboard operation
AirMapView copied to clipboard

Google Maps JavaScript API warning: NoApiKeys

Open peterszaszlateral opened this issue 7 years ago • 3 comments

Hi,

For some reason I can't get to make the JavaScript Google maps to work.

I created a totally new account in Google Cloud Console and created all the necessary setup including the billing system.

For some reason the Web Maps are still throwing this Google Maps JavaScript API warning: NoApiKeys exception and the map is showing up with a dark grey overlay on top of it, stating that the maps is only for Development Purposes.

I am using the sample app and I am getting these same results.

peterszaszlateral avatar Oct 17 '18 09:10 peterszaszlateral

Google likely changed their policies on google maps API. and you likely need to add the API key to the js. https://developers.google.com/maps/documentation/javascript/get-api-key. and set it as a key param in https://github.com/airbnb/AirMapView/blob/30e44de7fdbca00c263eaea76090d6b248418fa6/library/src/main/assets/google_map.html#L13.

There is probably a way to inject the key so you wouldn't need to modify the library.

nwadams avatar Oct 28 '18 18:10 nwadams

Did anyone manage to set api key to the web view map?

dneykov avatar Jan 18 '19 12:01 dneykov

I manage to se api key without modifying the library. Just create assets folder in your app and copy google_map.html and include api key in script tag.

dneykov avatar Jan 18 '19 14:01 dneykov