Great post Carlos. I have a question though. From the example above the distance between points calculated appears to be "as the crow flies" or "direct-point-to-point" and does not take into account for example the twists and turns in roads etc. How would one factor those finer details into the solution?