Tiger
Tiger

Reputation: 310

Converting an address to geolocation and adding a range

I have city address and state on my server.

I need to fetch data in my iPhone application as per distance range (i.e in miles).

Please give some proper suggestions.

Upvotes: 0

Views: 523

Answers (3)

yinkou
yinkou

Reputation: 5766

You can travel to each of your cities and measure the highest position of some stars.
Through the altitude relation you can calculate then you current latitude.

The longitude is a bit more complicated. You need an accurate clock and a table/chart of star positions/times. Then you take measure the time of the highest position of some stars and compare it to your table. with the difference of this two values you can calculate the longitude of the city.

But there are already people who did that and share their results.

Upvotes: 0

Maulik
Maulik

Reputation: 19418

You can use Google Geocoding to get Lat-Long form address.

For example :

http://maps.google.com/maps/api/geocode/json?sensor=false&address=newyork,us

address — The address that you want to geocode.

Upvotes: 1

V.V
V.V

Reputation: 3094

You can use the google geolocation service, where it will get the Lat long from the address or vice-a-versa.

Please read the FAQ for the same.

Another is Foursquare which also nice to use and provides good data.

This will solve your issue.

Upvotes: 0

Related Questions