%let name=mapgif;
filename odsout '.';

data mydata;
format population comma12.0;
input st $ 1-2 population;
year=2000;
state=stfips(st);
datalines;
VA  7078515
NC  8049313
SC  4012012
GA  8186453
FL 15982378
;
run;

data mydata; set mydata;
length htmlvar $500;
htmlvar='title='||quote(
 'State: '|| trim(left(st)) ||'0D'x||
 'Population: '|| trim(left(put(population,comma12.0)))
)
||' '||
 'href="http://www.state.'||trim(left(lowcase(st)))||'.us"';
run;



 GOPTIONS DEVICE=gif;
 
 ODS LISTING CLOSE;
 ODS HTML path=odsout body="&name..htm"
 (title="GIF ODS HTML Drilldown Map")
 style=minimal gtitle gfootnote;
 goptions noborder;

goptions gunit=pct htitle=6 ftitle="arial/bo" htext=4 ftext="arial";

axis1 label=none;
axis2 label=none minor=none offset=(0,0);

pattern v=solid color=cx43a2ca repeat=5;  

title "Year 2000 U.S. Census Population";
title2 color=gray "GMAP w/ GIF ODS HTML Drilldown";
footnote color=gray "(Each state has an html drilldown)";
proc gmap data=mydata map=maps.us all; 
id state;
choro population /
 discrete
 coutline=black 
 html=htmlvar
 nolegend
 des="" name="&name" ;  
run;


 quit;
 ODS HTML CLOSE;
 ODS LISTING;
 
