+ Start a Discussion

finding distance using geolocation field

I want to find the diatance between two places. I'm creating custom object with a custom field of data type Geolocation. What should I do next?

Ken KoellnerKen Koellner

Unfortunately that document really doesn't answer the question.


What is really needed is a function like --


Double miles = distance(myObj1.myLocation_latitude__s, myObj1.myLocation_longitude__s, 41.1234, -71.5678, 'mi');