/* 1. HTML output file location */ filename fout 'c:\gmapoutput_poly.html'; /* 2. Data preparation */ data regions; input region $ acolor $ area population lat lng; format population comma12.; datalines; AA #00ff00 68.3 650000 38.996132 -77.042385 AA #00ff00 68.3 650000 38.893596 -76.912609 AA #00ff00 68.3 650000 38.793589 -77.038952 AA #00ff00 68.3 650000 38.875424 -77.045818 AA #00ff00 68.3 650000 38.934735 -77.119289 BB #ab00ff 150 990000 38.996132 -77.042385 BB #ab00ff 150 990000 38.934735 -77.119289 BB #ab00ff 150 990000 38.875424 -77.045818 BB #ab00ff 150 990000 38.793589 -77.038952 BB #ab00ff 150 990000 38.881838 -77.337643 BB #ab00ff 150 990000 39.041478 -77.312237 ; run; /* 3. Determine map center */ proc means data=regions noprint; var lat lng; output out=dataspan (keep=minlat maxlat minlng maxlng) min(lat)=minlat max(lat)=maxlat min(lng)=minlng max(lng)= maxlng; run; data centerdata; set dataspan; clat = minlat + (maxlat - minlat)/2; clng = minlng + (maxlng - minlng)/2; run; /* 4. Initialize map */ data _null_; file fout; set centerdata; put '' / '' / '' / '' / '

Sample of Google map in SAS output with multiple polygons

' / '
' / '

Move it, zoom in and out, click on highlighted areas to display more infromation...

' / '' ; run;