admin管理员组

文章数量:1419185

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: ;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.

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./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.

Share Improve this question asked May 24, 2014 at 23:52 EinZweiDreiEinZweiDrei 1131 silver badge8 bronze badges 4
  • Have you had any luck with this? – jayarjo Commented Jun 1, 2014 at 6:21
  • @jayarjo My apologies in not replying to your ment sooner. I did eventually get this to work (it seemed to take 24 hours or thereabouts for the API call to work - I had been trying to use it within an hour to 2 hours of the application key being generated) but thanks for asking! – EinZweiDrei Commented Jun 9, 2014 at 19:02
  • I got it working only after I removed the key pletely. – jayarjo Commented Jun 12, 2014 at 11:41
  • Although you didn't choice Google Maps SDK for iOS SDK, but this plugin helps you to use the SDK in your PhoneGap app easily. Just for your information. github./wf9a5m75/phonegap-googlemaps-plugin – wf9a5m75 Commented Oct 31, 2014 at 19:29
Add a ment  | 

1 Answer 1

Reset to default 5

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

https://developers.google./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.

本文标签: Use of Google Maps JavaScript API v3 in PhoneGap iOS AppStack Overflow