Link to home
Start Free TrialLog in
Avatar of Ian White
Ian WhiteFlag for Australia

asked on

Calculate distance between two Lattitude Longitude Coordiantes using ColdFusion 6

I see there are many formulae on this site for doing this. But I need to know how to do it using
Cold Fusion.

I will have two coordinates I need to calculate the distance dynamically as I run a Schedulted CF task to mail members of the data base:- .  to see if a posted opportunity is within their defined area - they specify how many KMS they are prepared to travel.

Eg I will have

        MemberLat = "37.6922361"
        MemberLng = "-97.3375448"

          OpportunityLat = "56.1303660"
        OpportunityLng = "-106.3467710"

How to calulate the distance between in Kilometers using CF6?

Thanks for your help/
ASKER CERTIFIED SOLUTION
Avatar of gdemaria
gdemaria
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ian White

ASKER

Thanks it brings back a result ok.  Do you know if the CF code returns miles or kilometers. It does not say in the documentation. Give it talks about zip codes - does this mean miles?

Thanks
Ian

 Yea, it's miles.   Just convert the result to kilometers..
Quick response