The distance the swallow flies doesn't seem very interesting for many cases, where the terrain forces you to take a much longer route due to bridges, train track crossings, etc. Wouldn't you be better of using the Google maps API to return the length of an actual route to the target?