The Google Maps API naturally has a rich history on ProgrammableWeb. Over the last year or so, Google has released additional maps-related APIs as separate services. One of the latest ones is the Google Distance Matrix API. This allows a developer to submit a matrix of locations, as origins and destinations, and get a list of the distances in return.
Your next geo app is going to be easier to build. Instead of running your own database and collecting geographic data yourself, you can build on top of TownMe and its newly-launched read/write Geo API (tech details at our TownMe API profile).