Well, I’ve just learned there is built in support for calculating distance between two points. I wish I would knew… http://www.econym.demon.co.uk/googlemaps/dist.htm.
Well – my code works for now, so I will leave it as is. Don’t fix what is not broken.