I am using GMAP with HTML5 ODS output and including my own HTML variable to display information for each area on the map. However, I still see a second hover display on the map output showing the "Des=" value. I've tried removing this option entirely from GMAP, and entering Des="" and I still get a hover-over description showing "GMAP" which partially covers some of the htmlvar information in the output. How can I remove this default description entirely?
Moved to Graphics forum where hopefully you'll get an answer.
I use des='' (with two single-quotes, and nothing between them) to get rid of the default hover-text description in my gmaps. Give that a try, and if it doesn't work for you, give us a little more information about how you're running SAS (in batch mode, using DMS sas, through EG, other? etc).
Here's the test program I ran in DMS sas just now...
proc gmap data=mapsgfk.us map=mapsgfk.us;
id state;
choro segment / levels=1 des='';
run;
I had the Des='' after the semicolon for the choro statement as :
proc gmap data=mapsgfk.us_counties map=mapsgfk.us_counties anno=anno_all;
id state county;
choro segment / legend=legend1 levels=5 midpoints (0 1 2 3 4) html=htmlvar ;
des='';
run;
I moved it inside that like you had done in your example and the issue persists. I should point out that the html output in the SAS results window does not show the description, but in the html output file it does. So, the issue is limited to the output file.
Here is my ods statement:
options orientation=landscape papersize=legal nodate nonumber;
ods html5 style=sasweb;
file="....";
...
ods html5 close;
Try using the following goption ...
goptions noaltdesc;
If that doesn't work, show the code you're using to create the html file (or are you using an interface like EG to create the HTML file?)
Hmm ... well, I did a little testing on this just now (I hadn't done much with html5 before), and it appears that html5 gmap has a default 'alt' text (such as "Choropleth map of population_2010") that can be suppressed with either the des='' option or "goptions noaltdesc;"
But the html5 output also seems to show the graph title in a popup similar to the alt popup. And since I haven't used html5 output much, I'm not sure whether or not there's a way to suppress the title showing up in a popup (maybe someone else knows?)
One work-around would be to suppress the title (using a blank title statement), and then use a 'note' statement, or annotate, to fake a title. Like the last sample below.
This sample shows the iterations I went through, trying to find a way to get rid of all the 'alt-like' popup windows...
%let name=map007;
filename odsout '.';
ODS LISTING CLOSE;
ods html5 path=odsout body="&name..htm" style=sasweb;
data my_data; set sashelp.us_data;
run;
title "No special options";
proc gmap data=my_data map=mapsgfk.us;
id statecode;
choro population_2010 / levels=5;
run;
title "Using des=''";
proc gmap data=my_data map=mapsgfk.us;
id statecode;
choro population_2010 / levels=5 des='';
run;
goptions noaltdesc;
title "Using goptions noaltdesc";
proc gmap data=my_data map=mapsgfk.us;
id statecode;
choro population_2010 / levels=5;
run;
goptions noaltdesc;
title;
proc gmap data=my_data map=mapsgfk.us;
note move=(40pct,94pct) height=14pt font="albany amt/bold" "Using note as title";
id statecode;
choro population_2010 / levels=5;
run;
ods html5 close;
ODS LISTING;
I'm afraid I cannot go with the last one, as I am using multiple title statements with unicode embedded in some of them (I believe you were the one who assisted in getting that to work.) I have a legend for the anno points built into the title. I am also using multiple footnotes. And these statements are all following the "file=" statement.
Hmm ... I tried a few more things (such as options(outline="off" title='') and ods noproctitle;) to see if they would affect it ... but they don't seem to. I think I'm out of ideas on this one!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.