[android-developers] Re: How to calculate distance between to city (dynamically)

2010-09-21 Thread Johan
Android has a distanceTo method that does this for you, it's in the Location class (see http://developer.android.com/reference/android/location/Location.html#distanceTo%28android.location.Location%29) So, for instance: Location amsCentral = new Location(Amsterdam CS);

Re: [android-developers] Re: How to calculate distance between to city (dynamically)

2010-09-17 Thread Shashidhar
Doesn't the method of Location class implement the same formula??? On Fri, Sep 17, 2010 at 11:21 AM, Rocky rkjhaw1...@gmail.com wrote: thanks man On Fri, Sep 17, 2010 at 11:12 AM, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: The Haversine formula computes distance between two

[android-developers] Re: How to calculate distance between to city (dynamically)

2010-09-16 Thread dadada
you can also use 'haversine' formula. google it. you need two geopoint. On Sep 16, 3:36 pm, Rocky rkjhaw1...@gmail.com wrote: Hi Shashidhar, Thanks dear... On Thu, Sep 16, 2010 at 12:56 PM, Shashidhar shashi.zep...@gmail.comwrote: Have a look at this

Re: [android-developers] Re: How to calculate distance between to city (dynamically)

2010-09-16 Thread Rocky
Hi DADADA, Can u elaborate it. On Thu, Sep 16, 2010 at 9:13 PM, dadada ytbr...@gmail.com wrote: you can also use 'haversine' formula. google it. you need two geopoint. On Sep 16, 3:36 pm, Rocky rkjhaw1...@gmail.com wrote: Hi Shashidhar, Thanks dear... On Thu, Sep 16, 2010 at

[android-developers] Re: How to calculate distance between to city (dynamically)

2010-09-16 Thread Maps.Huge.Info (Maps API Guru)
The Haversine formula computes distance between two points along a spheroid (such as Earth). You will need to know the coordinates of each city to use this formula. Coordinates for nearly all cities in the world can be downloaded from the geonames.org website for free. The Google geocoder will

Re: [android-developers] Re: How to calculate distance between to city (dynamically)

2010-09-16 Thread Rocky
thanks man On Fri, Sep 17, 2010 at 11:12 AM, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: The Haversine formula computes distance between two points along a spheroid (such as Earth). You will need to know the coordinates of each city to use this formula. Coordinates for nearly all