BookmarkSubscribeRSS Feed
RandoDando
Pyrite | Level 9

 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?

9 REPLIES 9
ChrisNZ
Tourmaline | Level 20

Moved to Graphics forum where hopefully you'll get an answer.

GraphGuy
Meteorite | Level 14

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;

 

RandoDando
Pyrite | Level 9

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.  

RandoDando
Pyrite | Level 9

Here is my ods statement:

 

options orientation=landscape papersize=legal nodate nonumber;
ods html5 style=sasweb;
file="....";

...

ods html5 close;
GraphGuy
Meteorite | Level 14

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?)

 

RandoDando
Pyrite | Level 9
That didn't work. I am using EG to create the file. The code is very similar to what I posted above. I am using the MAPSGFK.US_COUNTIES file, with a few variables added to it for the choro statement and the HTML variable. The anno set is only x y coordinates which were projected to the same coordinate system of the counties data set.
GraphGuy
Meteorite | Level 14

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;

 

 

RandoDando
Pyrite | Level 9

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.  

GraphGuy
Meteorite | Level 14

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!

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 1600 views
  • 1 like
  • 3 in conversation