
Java-Based Desktop Mapping with Openmap #66
Chapter 6, Mapping on Your Desktop
|
315
HACK
After the first three lines, this dialog is all about cartographic symboliza-
tion—picking the colors your data will draw in. The important thing to
know is that default values are filled in for everything, so you just need to
fill in the locations of the data set components. If you saved the data using
the directory structure I used, your .shp file path will be /geodata/us/country-
wide/states/statesp020.shp. Similarly, your .dbf path will be /geodata/us/coun-
trywide/states/statesp020.dbf, and .shx will be /geodata/us/countrywide/
states/statesp020.shx. Enter these values and press OK. After a few seconds,
the U.S. states should draw on your map in (almost) exactly the right places,
as illustrated in Figure 6-23.
Hacking the Hack: Preserve Your Settings
That was exciting, but as soon as you quit Openmap, the U.S. States layer is
gone. You’ll probably want to add this layer to the basic ones that are
always available in the program (if you live in the U.S.). The program
doesn’t have a save function, but you can program this layer into
Openmap’s startup file. Open your openmap.properties file again. This
time, search for
openmap.layers=. This is where you specify what data
should show up on your map. The rest of the file consists entirely of prop-
erties that describe the location of datafiles and how they should ...