
4
|
Chapter 1, Mapping Your Life
#1 Put a Map on It: Mapping Arbitrary Locations with Online Services
HACK
More on the MapQuest LinkFree service
The previous examples focused on using latitude and longitude, but
MapQuest LinkFree URLs also accept the address of your target location as
a parameter. Here is a sample LinkFree URL that creates the map shown in
Figure 1-1:
http://www.mapquest.com/maps/map.adp?city=sebastopol&state=CA&address=1005+
gravenstein+hwy+n&zip=95472&country=us&zoom=6
That long URL can be broken down into the following parts. This is the root
of the main MapQuest web site:
http://www.mapquest.com
They have a directory called Maps that includes a program called map.adp
that generates the map in response to your parameters:
/maps/map.adp
When you see a ? in a URL, you know that what follows are parameters (or
arguments) for your request. In this case, we are telling the program map.
adp that we want to see a map for Sebastopol:
?city=sebastopol
Figure 1-1. MapQuest LinkFree map of O’Reilly Media, Inc. headquarters