0

I want to retrieve all the address locations (latitude,longitude,format address) for a single 'search address' request (a little vague such as "Tata Consultancy Services") in MapKit. I searched on the net and came across GoogleMapsAPI WebServices .

http://code.google.com/apis/maps/documentation/geocoding/

But problem with response is that, it returns only a 'single object' in 'results array' response for a address search. As an example if you search "Tata Consultancy Services" you get only one location whose formatted address is "TCS Rajshree Business Park, Tadiwala Rd, Sangamvadi, Pune, Maharashtra, India".My question is how can i get details of other locations as we all know that this is not the only office of TCS.

1 Answers1

0

I would like to quote two documentation links related to your problem.

http://code.google.com/apis/maps/documentation/geocoding/#GeocodingRequests

"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".

So you may found one or more result. but as you are requesting it from iPhone and sensor is by default true. you receive nearest matching result for your query.

The solution is "Viewport Biasing".Please find its details at below link under heading name "Viewport Biasing":-

http://code.google.com/apis/maps/documentation/geocoding/#Viewports

Another options you can try on:

  1. try setting sensor as false.
  2. try region biasing as described on the same page cited above.
  3. try some other word like "hotel near placename" and check the response result
Shashank
  • 51
  • 5
  • Thanx for the suggestion man. But still "Viewport Biasing" doesn't solve my problem as it returns only a single result.Is there any way from which i can get details of all the locations. – bindaaslover Mar 13 '12 at 07:04