Google Maps Geoencoding
I am trying to geoencode an address using google maps, but having an issue with it.
When I am trying an address - ambience , gurgaon, india, it results some required responses, but when I am trying - ambience mall, gurgaon, india, it results back zero results.
this is the code with which I 开发者_Go百科am trying -
geocoder.geocode( { 'address': address}, function(results, status) {})
here address is the string which I have writtern above.
The same string gives result when I enter on maps.google.com.
Yes, I also faced this from Google API. Actually, in http://maps.google.com when you search "ambience mall, gurgaon, india" it gives so many suggestions in the LHS menu with several markers a,b,c,d..., but does not pop an exact marker. So this address does not have any successful geocode results. But when a addreess [e.g. gurgaon, india] pops only one marker on http://maps.google.com, it does surely have a Geocode result.
I think you will be interested in using the suggestion API so that your users always search for a valid address. Visit http://gmap3.net/examples/address-lookup.html
精彩评论