-1

Can any one help me in getting the latitude and longitude value of the place? The place details must be gotten from the user as a input. The place detail can be ZIP code, city name, address, or state code.

jscs
  • 63,694
  • 13
  • 151
  • 195
Malathi
  • 69
  • 1
  • 6
  • What place? What have you tried so far? – jscs Sep 28 '11 at 07:37
  • I wanted to fine the lat and long of the cities inside United states – Malathi Sep 28 '11 at 07:41
  • So you essentially want the lat/lng for an address? – raidfive Sep 28 '11 at 07:41
  • So what have you tried? What has your research turned up? What did you find in the documentation? What have you done to attempt solving this problem yourself? – jscs Sep 28 '11 at 07:42
  • He user can give address or only cityname or only the state. for example he may give as 3198 GRATIOT BOULEVARD (or) MI (or) MARYSVILLE, MI – Malathi Sep 28 '11 at 07:44
  • possible duplicate of [How to get the address of a latitude and longitude in an iphone application](http://stackoverflow.com/questions/2063717/how-to-get-the-address-of-a-latitude-and-longitude-in-an-iphone-application) or [Get the user's latitude and longitude](http://stackoverflow.com/questions/3066036/) – jscs Sep 28 '11 at 07:46
  • Or possibly http://stackoverflow.com/questions/3387039/convert-the-address-into-latitude-and-longitude-for-google-maps-in-iphone – jscs Sep 28 '11 at 07:52
  • See also: http://stackoverflow.com/search?q=%5Bobjc%5D+latitude+longitude+from+address&submit=search – jscs Sep 28 '11 at 07:53

3 Answers3

0

You can use the Google Geocoding API to convert an address into a lat/lng.

raidfive
  • 6,603
  • 1
  • 35
  • 32
0

One way I have used is to utilise the google maps API to return a lat/long for a given zip/postcode or city etc. Its normally quite good at dealing with different inputs.

Sadly I don’t have any C samples but could post up a VB.Net example if that helps

Kevin Ross
  • 7,185
  • 2
  • 21
  • 27
0

You need to geocode the address. Since Mapkit doesn't support geocoding (only reverse-geocoding) you'll have to use a web service to accomplish that. The are tons of web services for that. For example Google Geocoding

Youssef
  • 3,582
  • 1
  • 21
  • 28