
432
|
Chapter 7, Names and Places
#86 Track a Package Across the U.S.
HACK
• A value of yes to signal the program to modify Openmap’s properties. If
you’re curious about the Openmap properties file, there’s plenty of
information about it at http://openmap.bbn.com/cgi-bin/faqw.
py?req=show&file=faq06.004.htp.
$ java -cp . org.rajsingh.maphacks.shipment.PackageTracker \
<path to places.txt> <path to a new file name> yes
The Results
Remember that we started this hack wanting to put our package “on the
map”? Well, we’re finally there. Since we automatically added our data to
Openmap’s properties file, all we need to do is run the program. Your final
result should look something like Figure 7-7.
See “Java-Based Desktop Mapping with Openmap”
[Hack #66] to learn how to
get state boundaries on your map as well.
—Raj Singh
Figure 7-7. The resting places of a random package, as it makes its way across the U.S.