[Rails] Re: Geo Code

2009-02-19 Thread Conrad Taylor
On Thu, Feb 19, 2009 at 12:57 AM, Cyrus Dev < rails-mailing-l...@andreas-s.net> wrote: > > > Thanks Andrew > > but is there a way that i can do with geo code kit ? > > any idea ? > > Andrew Porter wrote: > > Cyrus Dev wrote: > >> > >> I want to find distance in miles between 2 points , I have latt

[Rails] Re: Geo Code

2009-02-19 Thread Cyrus Dev
Thanks Andrew but is there a way that i can do with geo code kit ? any idea ? Andrew Porter wrote: > Cyrus Dev wrote: >> >> I want to find distance in miles between 2 points , I have lattitude and >> longitude of both points , > > I do this (inside a model what has latitude and longitude att

[Rails] Re: Geo Code

2009-02-19 Thread Andrew Porter
Cyrus Dev wrote: > > I want to find distance in miles between 2 points , I have lattitude and > longitude of both points , I do this (inside a model what has latitude and longitude attributes) RadConv=(Math::PI/180) R=3958 def get_distance_to(to_lat, to_lon) lat1=self.latitude * RadCon