Click here to see the SAS code.
Click here to see the example.

This map demonstrates several tricks...

I take the maps.county sas/graph map data set and subset the state of Ohio.
I estimate the center of each county, by calculating the average 
longitude and latitude of each county.  I then create an annotate data set
with the county name for each county, at that long/lat location (I merge
in the county name from the maps.cntyname data set).  I create a list of 
the cities I'd like to see on the map, and I get their long/lat from the
sashelp.zipcode data set.  Also, I use sas/graph's proc greduce to 
create a map area containing just the outermost outline of all the counties
(with the internal boudaries removed) and turn that into an annotate data
set with a thick dark polygon line (this will be the state outline).

I combine the county map and all the annotate data sets, and use 
sas/graph's "proc gproject" to project the long/lat values into my 
x/y screen coordinates, and then I separate the annotate data sets out
from the county map data set.

Then I use sas/graph's "proc gmap" to draw the map, and annotate all the 
text and the state outline.

If the map weren't enough, I added some "extras"...

When you mouse over the county areas, you get an html title= charttip/flyover-text,
and when you click on a county it has an html href= drilldown to that county's 
recreation page.  This was done using gmap's 'html=' option.

I also define an "ODS Style" that contains an "Ohio DNR" graphic logo in the 
prehtml, and also make the title background (titlebg) green.

Back to Samples Index