I've enabled the Google Maps v3 (and v2) services in the API console and then generated a browser key.
I just swapped a maps.google.com/geo?q= URL for the below URL (example):
http://maps.googleapis.com/maps/api/geocode/json?sensor=false&key=newbrowserkeyfromconsole&address=ALE+BILSERVICE,ALVANGEN,Sweden
It is called with 1600 HTTPGET requests in one run, but now it doesn't even work when pasting 1 URL in a browser!
EDIT: I wrote that it runs once per day, but that is false. Fixed street addresses don't suddenly switch GPS coordinates. ;)
I looked at several similar threads, where generating a new browser key in the API console seemed to work. But not for me. I'm running this from "whatever client ip", so I left the url filter box empty when generating it, and get "Any referrer allowed", so it seems OK.
If I remove the key, I get OVER_QUERY_LIMIT.
Please advise.
Currently, the Google API Console cannot generate working API v3 browser keys for geocoding use at all, whether used via a JSON output URL or Javascript. This has been the case for at least the past 3 days.
Just as for Google Places a few months ago.
All you can do is ignore the error code 610, REQUEST_DENIED, and erroneous alerts, and wait for Google to fix it.
I'll be happy to change the accepted answer to one that describes how to contact Google about your Google Developer account, raise a ticket, register/pay for support, or similar.
Related
I'm trying to use a Google Maps key in my webform, but it keeps coming back saying that the key is wrong (in the developers console).
I've gone to the Google console and regenerated the API key. That won't work. I've also looked at the referrers and set them (when I run it it comes up as http://localhost:12345/myform.aspx - so I've added a referrer of http://localhost:12345/*) with no avail. I've also checked the referrer in the developers console (F12) which comes up as http://localhost:12345/myform.aspx so there's no issue there.
Am I missing something blindingly obvious?
EDIT - code is <script src="http://maps.google.com/maps/api/js?v=3&key=LONG_KEY_HERE;sensor=false"></script>
Returning
Google Maps API error: InvalidKeyMapError
https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key-map-error
You don't need to use a key if you are running it in localhost. Try using google maps without the key
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?sensor=SET_TO_TRUE_OR_FALSE">
</script>
Google Maps v3 API key won't work for local testing
Somehow, it's now started working. Three days after generating an API key.
That's progress for you!
(oh, and I removed the sensor part at the end. I did try it without it before and it didn't work, but for some reason it did today. I blame it on the fact that it was Friday when I tried it and Google had just decided to clock off early for the weekend)
I have a published layer in Google Maps Engine that I am attempting to display using the Google Maps V3 API. In GME, the layer's "Shared with" access list includes my user and the "API access" access list also includes by user.
I am making the Maps V3 API call using MapsEngineLayer from the visualization library, and setting the appropriate auth token and layer asset id as part of the layerOptions.
The API call is failing with the error message:
Google Maps API V3 error: 403 (Forbidden access for too many pageviews)
The URL looks like:
https://earthbuilder.googleapis.com/my_gme_layer_asset_id-4/maproot/json?
output=jsonp&access_token=my_auth_token&callback=xdc._tsel5i
I have found some discussion threads related to "403" and "forbidden", but am having difficulty figuring out the meaning of (and solution to) the "too many pageviews" issue.
Any suggestions would be appreciated.
If you tried with #David solution and it doesnt work. It worths to check that you are not caching (or storing locally) the google maps js script. Google don't allow that. If you serve that file it will work for about 3 days and then stop working.
How many requests have you made so far today, there are usage limits on the Maps API that may be preventing you from requesting any further data.
https://developers.google.com/maps/faq#usagelimits
Although it does seem unlikely that you have hit their hard set 25,000 requests, you may want to make sure that you aren't accidentally DOSing them with http requests. That sort of thing will invariably burn through your limit, and potentially place your IP on a blacklist.
Also, you should check the Maps API Reference materials, i think you may be trying to use a deprecated API.
https://developers.google.com/maps/documentation/webservices
Your http request should look more like this:
http://maps.googleapis.com/maps/api/service/output?parameters
Where output is either json or xml.
edit: The Maps API Help page is located here.
I am using Google Maps API to geocode locations from asp.net - doing a few queries per day (well under the 2500 limit). This has worked fine for a year and still works on my development server but now I am constantly getting the status returned 'OVER_QUERY_LIMIT'.
I assume, but have no way of knowing for sure, that this is because someone else on the same IP address of my host is doing the same and using all the limit.
The geocoding api does not seem to let me use an API key. If I try to add &key=xxx I get a REQUEST_DENIED error.
How can I identify myself to google as separate?
You can't identify yourself as separate from your co-hosted competitor (for example, by using a key). The reason for this is probably because people would simply use different keys to get multiple allowances.
The only solution is to change your hosting, or switch to client-side geocoding.
Google also limits on the number of request per second, this may be causing the error. Try switching to http://developer.yahoo.com/geo/placefinder/ usage limit is 50,000 requests per day
I am using google maps v3 and therefor have generated an api key in google's "apis conosole". I am loading the map with the key as parameter. As I can see the statistics in the api-project account, I am quite sure this works smooth.
Now I want to limit the domains which should be able to use a specific key, so I added an entry in "Referers" in the following way: "www.domain.com". I have assumed that if I load the map from a differnt domain (i.e. www.domain.org) I would receive an error, which does not happen. The map is loaded without any warnings (even not in chrome's console). In the apis console these "wrong" referers are even listed.
Additional info: all pages are using a single google app engine account and multiple google apps domains.
Any ideas what my mistake might be?
Thanks!
I think you need to enter full url or wildcards.
http://www.domain.com/*
or
*.domain.com/*
Probably if you dont have at least one value entry - it's ignored (to stop you completely shooting yourself in the foot)
I was trying to use Google Distance Matrix API JSON in my project, after formatting the url, for example:
http://maps.googleapis.com/maps/api/distancematrix/json?origins=Vancouver+BC|Seattle&destinations=San+Francisco|Victoria+BC&mode=bicycling&language=en&sensor=false
I was able to view the result in browser, but when I tried to make a http request to get the result, I will receive status : REQUEST_DENIED
In documentation:
REQUEST_DENIED indicates that the service denied use of the Distance
Matrix service by your application.
But I still don't know why my request is denied. More Info from google:
Use of the Distance Matrix API must relate to the display of
information on a Google Map; for example, to determine
origin-destination pairs that fall within a specific driving time from
one another, before requesting and displaying those destinations on a
map. Use of the service in an application that doesn't display a
Google map is prohibited.
If I can't get the result, how can I apply it on google map?
Anyone with same problem? I will post sample code later, to clarify my question more clearly.
I had a similar problem, but it was due to assuming that the sensor tag would default to false, but it is in fact required.
Google Distance Matrix API has a limit of elements set to 2500.
I highly doubt it that you would have gone over this limit, as you would have to have calculated the maximum 10 x 10 matrix 25 times over.
I am from South Africa, and it refused to work for any local addresses until I changed the transport mode to driving (from walking, I mean seriously, we have cars). Maybe that'll help
https://maps.googleapis.com/maps/api/distancematrix/json?origins=Seattle&destinations=San+Francisco&key=YOUR_API_KEY
Please make sure that you have created a credentials on Google Console which can be called as "API KEY" and you are using this API KEY in above request URL on the place of "YOUR_API_KEY"
I had the same problem earlier.
you need to check out with the Google Api key version and codes/scripts of version you are using.
I believe you need to get a Google Maps API key
You need to set an API KEY for using Google map services like this:
https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=Washington,DC&destinations=New+York+City,NY&key=**YOUR_API_KEY**
First thing is that you need is to have an API key assigned to your application. This is done by creating it in the Google API Manager.
I hope your have enabled distance matrix API from google console for your application.
please refer
https://support.google.com/googleapi/answer/6158841?hl=en
along with this you can restrict API_KEY for unauthorized use.