Google Maps API and geocoding in Crimea - google-maps

I use Google Maps Apis for geocoding to get full address for coordinates. It worked fine before revolution in Ukraine and the fact that Crimea currently is a part of Russian Federation. As result, nowadays I receive just this:
{
"results" : [],
"status" : "ZERO_RESULTS"
}
Do you know what is wrong?
Thanks.

FYI I got this answer from Google Support:
Since Crimea currently is a disputed territory (http://en.wikipedia.org/wiki/List_of_territorial_disputes), Geocoder results will currently not return results for reverse geocoding.

Related

Return data between geocoding api and google map is diffrent

I use geocoding api check the address,but sometime it does not works.
A place I can find it in google maps, such as,
https://www.google.com/maps?f=q&source=s_q&hl=en&geocode&q=United+States+Florida++33016+Hialeah+Gardens+8038+NW+103rd+St,Unit+39+Miami+Cores++
but it returns 'ZERO_RESULTS' when I use geocoding api to check the address,
https://maps.googleapis.com/maps/api/geocode/json?address=United+States+Florida++33016+Hialeah+Gardens+8038+NW+103rd+St,Unit+39+Miami+Cores++&sensor=true
{
"results" : [],
"status" : "ZERO_RESULTS"
}
Maybe the data between google map and geocoding api is diffrent.
Or I use the geocoding api in a wrong way,format the address?
You try to find business Miami Cores Inc using Geocoding API.
Please note that Geocoding API works only with street addresses, all business results are out of the scope.
In case when your intention is to search a business, Places API is the best option.
E.g.
https://maps.googleapis.com/maps/api/place/textsearch/json?query=8038%20NW%20103rd%20St%2C%20Hialeah%20Gardens%2C%20FL%2033016&key=YOUR_API_KEY
This should work now, since Issue 10585 has been fixed:
Query: United States Florida 33016 Hialeah Gardens 8038 NW 103rd St, Unit 39 Miami Cores
Result: 8038 NW 103rd St, Hialeah Gardens, FL 33016, USA (source, API request)
The Geocoding API will find the same result as Google Maps, but return only the address of the place. If you need business names, phone numbers, etc. you'll need to use the Places API (Autocomplete or Search) instead.
However, I wouldn't count on Google Maps APIs to always understand your backwards query, your query terms are in the reverse than usual order. You may want to adhere to the following to get better results:
How should I format my geocoder queries to maximise the number of successful requests?
Best Practices When Geocoding Addresses

Google Geocoding API no longer displays localities every time

I'm a french developer and I have question about GMAP Geocoding API.
I'm on a new website work, which use this API.
The Geocoding API is used to get geocoded boundaries of french cities when user enter a french postal code.
So I request the API by this URL : https://maps.googleapis.com/maps/api/geocode/json?address=MY_ZIP_CODE&components=country:fr&key=my_key
In France, sometimes there is multiple cities for one postal code.
The default city is written in the JSON in address_components, "types" : [ "locality", "political" ] and all the cities are writtent in "postcode_localities".
(have an example in screenshot).
Last week, everything was working good.
But today, I've got a big probleme... When I use postal code (69510, 69310, 69600, etc....) multiple cities or alone city aren't no longer displayed.... But it works good for "69530".
It's embarassing for me because the website I'm bulding use the postal code to do a geolocated search with km radius...
Do you know if this API was update ?
I've search on Google.... But I've never find an answer.
Thanks in advance for your help !!
Have a nice day
My screenshot that show the API JSON answer
I was experiencing this problem as well yesterday. #xomena was right.
They updated their API at the end of November/beginning of December, and started more strictly encouraging best practices – using the Geocoding API for complete postal code strings (for example, “48 Pirrama Rd, Pyrmont, NSW, Australia”), and the Places API for more ambiguous addresses and semantic locations, including businesses and points of interest.
Specifically their blog post said:
Future Changes to Geocoding API
We plan to roll out an update to the Geocoding API at the end of November 2016 that will increase the difference between Geocoding and Places performance for ambiguous and unambiguous queries. This change will improve the quality of Geocoding results for unambiguous queries, but will be more likely to return ZERO_RESULTS for ambiguous or incomplete queries where the Geocoding API was unable to find a high quality result.
If you are already using the above best practices, you should see an improvement in your Geocoding API results. If you are currently using the Geocoding API for incomplete or ambiguous queries, or for queries that may contain non-address information such as business names or apartment numbers, we recommend that you switch to the Places API instead, as it is likely to give better quality results for your use case.
Try using the Place Search API instead! https://developers.google.com/places/web-service/search
Please file a bug in the Google Maps API issue tracker.
This is not related to the new geocoder, you'll see that adding new_forward_geocoder=false to your requests makes no difference.
The postcode_localities field is never exposed in Places API.
I am experiencing the same problem as described by #Jean-Baptiste.
I opened an issue : http://code.google.com/p/gmaps-api-issues/issues/detail?id=11087
Thanks for your answers.
That's true, the Places API can't give an autocompletion and the Autocomplete API doesn't give me satisfaction.
I've change my JS API parser and I get geocoding datas even if the postcode localities exists. If the zip code exists, so the geocoding datas exist.
That's a solution.... The visitor knows the zip code of the city where he lives. And for a major part of cities, the zip code is ok.
I saw that www.booking.com has the same problem...
Screenshot of the same problem on booking.com
That's solved for me ;-)
Thanks !!

Google Maps "place" vs "address"

This is a followup question to another I recently had about the Google Maps API.
The following request returns zero results...
http://maps.googleapis.com/maps/api/geocode/json?address=801+BALTIMORE+STREET%2c+Hanover%2c+PA%2c+17331&sensor=false
However, from http://maps.google.com the following address locates correctly...
801 Baltimore Street, Hanover, PA
From the previous question the answer was because the result returned from maps is a "place" and not an "address".
My new question is how can you tell maps is returning a "place" vs and "address"? Is there something in the URL or the response that gives this away?
If you look at the response on Google Maps, notice the "3 reviews", that is a places entry. The way the entry reads also indicates it to me:
Giant
801 Baltimore St, Hanover, PA ‎
(717) 632-6673 ‎ · giantfoodstores.com
3 reviews
It seems that the link above doesn't work the first time, but if you click on the "search" it finds it.
geocodezip:
thanks for the response.
assuming that the google maps web utilizes the places API, I tried to get the same result from places API.
for this address: 526+Kawailoa+Road,Kailua,Oahu,HI+96734
google maps does find the correct location. but geocoding API fails, so
I try the places API:
curl -v 'https://maps.googleapis.com/maps/api/place/textsearch/json?query=526+Kawailoa+Road,Kailua,Oahu,HI+96734&key=MY_API_KEY'
it returns a empty list. so why does the maps web page finds it but neither places API nor geocoding API finds it?
Thanks
Yang

Google Maps API not working with an apostrophe?

I am trying to use the Google Maps API to get the latitude and longitude of a few locations. For some reason, whenever I send a place name with an apostrophe, it does not return any results.
For instance, if I send the following requests for searching Berri's Pizza Cafe I get the results mentioned below
http://maps.googleapis.com/maps/api/geocode/json?address=berri%27s+pizza+cafe&sensor=false
{"results" : [], "status" : "ZERO_RESULTS"}
And this
http://maps.google.com/maps/geo?q=Berri%27s%20Pizza%20Cafe&output=json
{
"name": "Berri's Pizza Cafe",
"Status": {
"code": 602,
"request": "geocode"
}
}
I assume this is a problem with Google Maps API (found a forum post saying this was an issue in the javascript API but was supposedly fixed there, probably not in this)
Does anyone have a workaround for this situation?
Thanks.
The issue is that you are attempting to geocode a business name; the geocoder works with postal addresses. Omitting the apostrophe doesn't get any results either (thus proving it's not the apostrophe which is the problem).
Note that the Maps geocoder is far more sophisticated and uses a variety of data sources to locate targets, including address geolocation and business name lookup.
You may be able to find the data you're looking for using the Places API (but you will need to specify the city which you are currently omitting).

Does google maps api support "suggestions"?

Does google maps api support "suggestions" ?
In other terms, can I receive from google maps the suggestions given a submitted query ?
thanks
You can use the Geocoding API, which according to the documentation will return multiple results:
Generally, only one entry in the
"results" array is returned for
address lookups, though the geocoder
may return several results when
address queries are ambiguous.
You should try using the maps api autocomplete which will return suggestions for locations
Google Maps API Places Auto Complete