Archive for category Maps
Proximity Searches in Address Book
Posted by clark in Applescript, Maps, Python on 2009/07/17
This post builds off of yesterday’s discussion of Python and Google Maps. I’ll assume you have the functions yesterday all installed (either by calling them from an other file or just copying them into the file you’ll work with here). Yesterday we showed how to lookup addresses in Google Maps and then how to calculate a distance between two locations. Today we’ll expand that by finding all the addresses nearby a particular location.
I came up with this script when I kept needing to find clients near a general area. Now you could throw a nice UI on this. Personally I find it most convenient to just modify the source code. (That’s part of why I like scripts – it’s usually easier to just modify the code rather than make a robust interface)
Getting Locations from Google Maps
Google maps has a nice little feature that lets you translate addresses to latitudes and longitudes. Why would you want to do this? Well it lets you script finding the distance between two addresses. I’ll show how that is useful in a subsequent hint. But for now let’s show how to get the location from an address and then how to calculate a distance.
.jpg)
Recent Comments