We are using the Google Maps API method getLocations() for geocoding addresses the user supplies. This used to work (up until yesterday) using only street names like "Drottninggatan". But as of today, that method returns error 602 instead of an array of possible matches.
Did Google change anything yesterday, or what else have happened? We've checked our own code and nothing new is deployed since the 7th of April.
EDIT:
We are using v2 for this service, but another where we've upgraded to v3 has the same problem
EDIT2:
I created an issue on Google with this - please star it there if you want the issue to get attention Google Maps Issue
As stated in the comments, Google seem to have resolved this issue.
Related
I have been working on an application which uses google maps api. recently i found geocoding not compatible with some address like,
http://maps.googleapis.com/maps/api/geocode/json?address=ae
which the address is country code. But it was working properly before. But today
09/08/2017 i found this issue. and additionally I found geolocation also fails to determine the location frequently in official website
https://developers.google.com/maps/documentation/javascript/geolocation.
Please guide.
Thanks.
For the searching of the country by its code I would suggest applying component filtering instead of the address parameter. It should work better in this use case. Passing country code as address parameter is treated as incomplete street address and the result is prone to be ZERO_RESULTS for incomplete addresses. Change your query to
https://maps.googleapis.com/maps/api/geocode/json?components=country%3AAE&key=YOUR_API_KEY
Regarding to the second issue, this is a bug reported at Chrome issue tracker:
https://bugs.chromium.org/p/chromium/issues/detail?id=753242
It looks like Google team has already adjusted the usage quota for the API key that they use internally and solved this issue.
I am trying to use google maps distance matrix api in my project to get distance between 2 places. I have also enable this api in google developer console. But I am continuously getting error ApiNotActivatedMapError.
I am using sample code provided by google as distance-matrix .
When you use a library or service via the Maps-Javascript-API, and use a key, you only need to activate the Google Maps JavaScript API .
When you get the particular error with the linked example you obviously didn't activate the Google Maps JavaScript API for your project.
Update:
since June 22, 2016 you need also to activate the related API(Webservice) for new applications when you want to use the following features:
geocoding service
directions service
distanceMatrix service
elevation service
places library
Old question.. But.. I had n similar issue recently with a ApiNotActivatedMapError using geocoding but Konerak's comment helped me get to this really nice post.
Basically, you can activate your API's here: https://console.developers.google.com/apis/library
Activating Google Maps JavaScript API along with the already activate Geocoding API solved my problem.
Hope it helps someone in a similar position :)
This link is enabled API https://console.developers.google.com/apis/library. For default emulator and in iOS its disabled, but in this console you can active this API.
UPDATE: In an effort to give a more clear question. How do I use the Google Console API key with the Google Maps Geocoding Web Service API? At the moment the request comes back as denied, when I specify the key but even though it failed it is logged in the Google Console API site's reports section.
Original Question
I have an existing app that has been modified to start geocoding address at the time they are entered (for use within the app on a Google Map). The volume expected for this is expcted to be within the free offering's limites and does not require a key at this time. However now I have to geocode all of the existing addresses. I have a small windows app (C#) that will loop through them one at a time, request they be geocoded (via https://maps.googleapis.com/maps/api/geocode/json) and store the results in the database. However I keep running into the query limit. To help alleviate this I've setup an account on Google API Console (https://code.google.com/apis/console/) so that I get go over the limit and just be billed for the overages.
The problem is in order to do utilize this billing alternative I have to provide a Console API Key to the request, but every time I do so I get a response back with a status of REQUEST_DENIED.
My URL looks like this
https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA+94043&sensor=false&key=123abc
If I take off the key it works fine, but with it on it fails. Now, I have seen other questions similar to this when looking around but can find no answer to the issue.
I've tried various alternate domains including maps.google.com, maps.googleapis.com and maps-api-ssl.google.com all seem to have the same problem from what I can tell.
Here's what I've been able to find out so far:
The service is listed in the Google Console API's site as Google Maps API v3, (there is a separate entry for v2) so I don't think it's a problem with keys no longer being mandatory in v3.
I know the requests are getting through and being correctly logged against this API key because with each failed attempt the request count goes up by one on the Reports tab of the Google APIs Console.
*I know it's not a problem with it not being accessed via a web page because the Console API explicitly lets you generates keys intended for Server/Service use and you can restrict access to them via IP address, not URL Referrer.
*I've also verified the parameter syntax as it's outlined on this page, as are other usage
*These seem to be generic to the Console API system but there is no mention of exceptions to these practices when used for the Google Maps API.
I even tried to contact Google but apparently they don't offer support over the phone (I was hoping to be done with this today but that's not looking likely).
It seems the key is not necessary anymore, since it doesn't increase your limit of free geocodings.
It was a legacy of v2, but geocoding API v2 was fully deprecated last March, 8.
If you need to use more than the free limit, I think you must adquire the Enterprise license.
Regards,
Eduardo.
I ran into this same issue and solved it by enabling the Geocoding API on the Google apis dashboard. Even though I'm using the Google Maps JavaScript API v3, it still required me to enable the Geocoding API as well. Make sure you understand the google's quota limits and billing system before enabling any API access. Hope this helps!
Late to this answer, but just in case anyone else has issue. Billing needs to be setup first and like Dylan said you also have to enable Geocoding API(this got me). At least I did for my locations app that shows multiple store location addresses.
I was testing the Netbeans tutorial about Restful WEbservices Getting Started With Restful Webservices
Everything seems to be working , but the problem is that whatever address i give, the maps always shows the same location.(Near Africa on Equator. Think its the default location). I got an api key from Google as described in the tutorial.
Tried to read the response from firebug. There are no errors, but the response is not easy to understand.
Any suggestions?
I don't know if you've found a solution or not yet, but I ran into the same problem and after looking around a bit, came to the conclusion that the problem lies in the returned value from the geocoding query (look for 'codeStr' in GoogleMapService.java).
The tutorial uses v2 of the Google Geocoding API and this problem is related to Google Maps' depreciation of v2 on the 8th of March 2013. I'll bet you are receiving a 610 code from the Geocoding API instead of the expected response, so the marker is plotted at 0 lat, 0 long.
You can find more information about the change in the GoogleMaps API here, and at the site for the Geocoding API. Hopefully, the creator of the tutorial will update it to get it into a working state again as it is otherwise a good source of information.
Then again, it could be the Netbeans implementation of the RESTful api that has been affected by the depreciation of v2.
I am getting confused about Google Map.
I am writing a CMS website using Ektron CMS.
That CMS has a map function which in turn used google map.
Till last year, I can get an API key for the map and everything was fine.
But When I created a new website yesterday, I cannot find the page to get the key anymore.
After searching a while, I found out that I need to sign in and add the services to get the key.
Then I found out the charging scheme as it is in this question
Then I also found out that Google Map V2 is deprecated.
Does it mean we can no longer use V2 ?
Can I just change v=2 to v=3 and everything will work fine?
What about charging scheme? If google really charges, will it be a lot?
switch from V2 to V3:
You cannot use V2-code with the V3-library, you have to update your code, it's completely different.
charging:
usually the use of v3 is free of charge, as long as you didn't exceed the limits and the map is accessible for everyone without any costs.
According to Google, API for Maps, Version 2 has been officially deprecated as of May 19, 2010 and they would be supporting it for 3 yrs which means your API key should be working fine unless you would have got a notice regarding the same.
This link shows Google's terms of service discontinuation. I guess you'll want to upgrade to v3 asap to keep your software up and running. :)