Graphics Programs Reference
In-Depth Information
On the web, the most common way to map points is via Google or Microsoft
Maps. Using their mapping APIs, you can have an interactive map that you
can zoom and pan in no time with just a few lines of JavaScript. Tons of
tutorials and excellent documentation are online on how to make use of
these APIs, so I'll leave that to you.
Google and
Microsoft provide
super straightfor-
ward tutorials that
start with their
mapping APIs, so
be sure to check
those out if you're
interested in taking
advantage of some
basic mapping
functionality.
However, there is a downside. You can only customize the maps so much,
and in the end you'll almost always end up with something that still looks
like a Google or Microsoft map. I'm not saying they're ugly, but when you're
developing an application or designing a graphic that fits into a publication,
it's often more fitting to have a map that matches your design scheme.
There are sometimes ways to get around these barriers, but it's not worth
the effort if you can just do the same thing but better, with a different tool.
Find Latitude and Longitude
Before you do any mapping, consider the available data and the data that
you actually need. If you don't have the data you need, then there's nothing
to visualize, right? In most practical applications, you need latitude and
longitude to map points, and most datasets don't come like that. Instead,
you most likely will have a list of addresses.
As much as you might want to, you can't just plug in street names and postal
codes and expect a pretty map. You have to get latitude and longitude first,
and for that, turn to geocoding . Basically, you take an address, give it to a
service, the service queries its database for matching addresses, and then
you get latitude and longitude for where the service thinks your address is
located in the world.
As for which service to use, well, there are many. If you have only a few
locations to geocode, it's easy to just go to a website and manually enter
them. Geocoder.us is a good free option for that. If you don't need your
locations to be exact, you can try Pierre Gorissen's Google Maps Latitude
Longitude Popup . It's a simple Google Maps interface that spits out latitude
and longitude for anywhere you click on the map.
If, however, you have a lot of locations to geocode, then you should do it
programmatically. You don't need to waste your time copying and pasting.
Google, Yahoo!, Geocoder.us, and Mediawiki all provide APIs for gecoding;
and Geopy, a geocoding toolbox for Python, wraps them all up into one
package.
Search WWH ::




Custom Search