2

Currently I am using the following URL to get the addresses and coordinates of a search string in my app.

https://maps.googleapis.com/maps/api/geocode/json?address=<Address>&sensor=false

The URL returns multiple results only when the string is given in a particular format. For example, I am trying to search for a business named "Yashoda Hospital, Hyderabad" and the results give only one address although the same search string gives multiple results in Google Maps website. But when I enter the string with a slight variation ("Yashoda Hospitals, Hyderabad") by adding an 's', it returns two addresses.

Is there a particular URL through which we can get all the possible results? Or what should be the approach to capture all the possible addresses that are returned in Google Maps website?

  • What is you application context? Why are you using that URL and not the `Geocoder` service in the [Google Maps API](https://developers.google.com/maps/documentation/javascript/reference)? – sabotero Feb 25 '14 at 16:29
  • 1
    request [**places**](https://developers.google.com/maps/documentation/javascript/places) instead of using the geocoder – Dr.Molle Feb 25 '14 at 17:40
  • 2
    The [geocoder](http://www.geocodezip.com/v3_example_geo2.asp?addr1=Yashoda%20Hospital,%20Hyderabad&geocode=1) returns one result. The [places API](http://www.geocodezip.com/v3_example_geo2.asp?addr1=Yashoda%20Hospital,%20Hyderabad&place=1) returns 20 (the maximum allowed in a single request) – geocodezip Feb 25 '14 at 18:56

0 Answers0