Click here to see the SAS code.
Click here to see the example.
This one is especially interesting in that I've *never* seen
anything like this done in sas before :)
A customer asked if there was a way to take a gif image of a map
and use that map in sas - this is what I came up with...
I took the gif image file, and viewed it in an image viewer,
and noted that it was 660 pixels wide by 337 pixels tall.
I then created a custom sas/graph gmap data set containing
1 map area, that just happened to be a rectangle, of the
same proportions as the image. Scroll down to the very last
page in the output of this example, and you'll see the gmap
showing that single map area (as a blue rectangle).
I then create an annotate data set, and use function='image'
to annotate the image of the mexico map onto the exact same
coordinates as my single map area. (See the 2nd page from
the bottom, to see this output).
I then create an annotate data set, containing a bunch of
circles (360-degree annotated "pies" that are empty), and I
display these pies/circles on the map. I draw this map with
all the circles once more -- this time with the circles 'invisible'
so that I can see all the writing on the map. I use the annotate
data set's "html" variable to encode html title= charttips,
so that when I mouse over the circles, I see the x/y value
of the center of that circle. I mouse over certain areas
that I want to have drilldown capabilities on, and I make
a note of them.
I then create another annotate data set called 'interest',
and I put in the x/y coordinates of the places of interest that
I made a note of before, and I create 'invisible' pies/circles
at those locations, and I use the annotate "html" variable to
encode html title= charttips/flyover-text, and href= drilldowns.
Now, when you view the final map (the very first one on this page)
you can mouse over the locations-of-interest (such as Cancun,
Chihuahua, La Paz, Gulf of Mexico, and Acapulco) and see the
charttip info, and click on it to drilldown to a webpage.
Back to Samples Index