Geocoding API not returning lat/long for a valid complete address

127 views
Skip to first unread message

PoojaC

unread,
Dec 12, 2011, 12:13:12 AM12/12/11
to google-map...@googlegroups.com
Hi All,

I am facing a weird issue with Google Maps Geocoding API v3. It works fine for all other addresses that i have tried so far but it's giving

me an issue with the following address.

35 & 36, Rajiv Gandhi Infotech Park,  Pune, 411057,  India
OR
Plot No 35/36,Rajiv Gandhi Infotech Park,Phase 1,MIDC,Hinjawadi,Pune,411057,
India
Even for: Rajiv Gandhi Infotech Park,  Pune, 411057,  India

The GeocoderStatus is ZERO_RESULTS.

Below is the code snippet.
var geocoder = new google.maps.Geocoder();
              geocoder.geocode({
                  'address' : address
              },
              function (results, status) {
                  if (status == google.maps.GeocoderStatus.OK) {
                     ....
                   }
                   else{...}

However, the same address is returning a valid lat/long with 'OK' status in json result at the below link.
http://maps.googleapis.com/maps/api/geocode/json?address=35&36+Rajiv+Gandhi+Infotech+Park,+Pune,+411057,+India&sensor=true

Can anyone please tell me what is the cause of this issue and its resolution?

MymsMan

unread,
Dec 12, 2011, 11:37:00 AM12/12/11
to google-map...@googlegroups.com
It could be that the Infotech park is too new to have made it into the Geocoders address data base or it is being considered as a Business and only findable with a Places search.  
Note: maps.google.com uses a combination of geocoding and Places search and is not the same as the API.

Your JSON search is actually just searching for 35 because the & in the URL is treated as the start of another parameter, if you remove the &36 the search fails.

PoojaC

unread,
Dec 15, 2011, 2:39:04 AM12/15/11
to google-map...@googlegroups.com
Thanks for your reply.
When I investigated further on this issue, i found out that the reason is not that this address is new or not in geocoder db but the issue is the postal code. When i remove the postal code, it gives me the correct lat/long coordinates. Now, as far as i could see, this is happening with addresses of India only. One solution would be to remove this postal code but they would not return precise results for other addresses. Moreoever, why is this happening at all when geocoding api accepts the postal code in the input address?

Andrew Leach

unread,
Dec 15, 2011, 4:02:34 AM12/15/11
to google-map...@googlegroups.com

The API accepts whatever you give it, which it then tries to make sense of.

This spreadsheet may not be entirely up-to-date, but it shows a
minimum state (the actual result could be better than indicated). It
shows that geocoding in India is "same as tiles", which I doubt
includes postcode data.

http://gmaps-samples.googlecode.com/svn/trunk/mapcoverage_filtered.html

If you do include postcode data for countries which are shown as "same
as tiles", the API is likely to get confused.

Reply all
Reply to author
Forward
0 new messages