Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of Google Maps JavaScript API v3 in PhoneGap iOS App

I'm experiencing a problem in using the Google Maps JavaScript API v3 for a Cordova PhoneGap based iOS App which, up until a few days ago, was working fine.

As I'm not an Objective-C developer I've purposely picked the Google Maps JavaScript API v3 over the iOS Maps SDK and have, in the Google Developers console, created a project and associated a browser key (set to enable all referrers) with that project.

In the head of the HTML page in my PhoneGap App I have called the Google Map API like so: https://maps.googleapis.com/maps/api/js?key=MY_APPLICATION_KEY_IS_PASTED_HERE&sensor=false

But when I run the App, despite this having worked without a key in previous versions and now having created a browser key and associating that as part of the call to the Google Maps API, I get the following error message:

Google has disabled use of the MAPS API for this application. The key provided is not a valid Google API key or it is not authorised for the Google Maps JavaScript API v3 on this site.

Can anyone provide any suggestions on what I might be missing/doing wrong and what I could possibly do to resolve this as I need to get the App running again. I've looked through the Google Maps and Developer documentation but can't see anything that would alert me to what I might be doing wrong.

Thanks in advance for any help that anyone out there might be able to provide with this query.

like image 549
EinZweiDrei Avatar asked May 24 '14 23:05

EinZweiDrei


1 Answers

I had the same problem. Solved it by setting up a key as per instruction here:

https://developers.google.com/maps/documentation/javascript/tutorial#api_key

BUT setting the "Referrers" to [NOTHING].

KEY NOTE: I had set it explicitly to "*" and this did NOT work and then edited it beck to be empty. I can't believe the edit back to nothing is necessary but...the default was already blank so and did not initially work so ... maybe try the explicit "edit" to blank if all else fails.

like image 113
Jason Leidigh Avatar answered Sep 30 '22 04:09

Jason Leidigh