1

In my app the user gives the location name for eg: "New York". in the text field, app gives the location ie latitude & longitude of New York. Which method I should use . please help me. Thanks.

anjum
  • 231
  • 2
  • 12
  • 1
    possible duplicate of [How do I do geocoding (NOT reverse geocoding) on iPhone?](http://stackoverflow.com/questions/988060/how-do-i-do-geocoding-not-reverse-geocoding-on-iphone) – Ilanchezhian Feb 08 '12 at 07:36

2 Answers2

0

You can use this Google Geocoding API below,

http://maps.googleapis.com/maps/api/geocode/json?address=Winnetka&sensor=false

In the place of address=Winnetka you can write address= New York,

You will get the lat and long in the xml responce so just parse the output.

Enjoy!

Hardik Shah
  • 1,683
  • 1
  • 11
  • 20
0

You can also use the Places Autocomplete API, which you may find useful.

Chris Broadfoot
  • 5,082
  • 1
  • 29
  • 37