February 10, 2004

Map Server Hacking

I've been experimenting with the US Census Bureau's Online Mapping Tool. The great thing about it is that its totally hack-able! Its easy to tell from the URL exactly what information is needed to return a map image. In fact, you can get it to simply return a .GIF of a specific size in a specific location with a marker in a specific location and a label of your choice. Pretty cool! Here is the URL for returning the image below:

http://tiger.census.gov/cgi-bin/mapper/map.gif?lat=40.79747&lon=-73.96831&wid=0.010&ht=0.010&iht=300&iwd=400&mlat=40.797466&mlon=-73.968312&msym=bigdot&mlabel=Bikes%20Against%20Bush

map.gif

Notice in the URL that it accepts GPS data (latitude and longitude) both for the center point of the map, and for the location of the marker. It also requires a scale factor, height and width of the image, the marker style, and the text of the label.

Here's how this helps me: everytime the bicylce prints a message it could also run a script that reads in the GPS location, gets a map with a marker, labels the marker with the text of the printed message, and automatically uploads the image to a weblog which time-stamps the entry. Pretty Sweet!

Posted by jkinberg at February 10, 2004 12:05 PM
Comments