BookmarkSubscribeRSS Feed
jsberger
Obsidian | Level 7

Hi All,

 

I've generated a map of some schools sites in the city of Houston using GMAP, where i've used the annotation feature to show the school name and level (e.g., elementary, middle or high) when i hover over the marker.  Is there anyway that i can share this map with colleagues who don't have SAS so they can open it and experience the same functionality?  

 

I did save the .MHT file when saving SAS output, but that file extension can't be emailed through my organization's email account.  Any recommendations for sharing maps with others (ODS, etc.)?

 

Thanks,

 

Jason

6 REPLIES 6
ballardw
Super User

@jsberger wrote:

Hi All,

 

I've generated a map of some schools sites in the city of Houston using GMAP, where i've used the annotation feature to show the school name and level (e.g., elementary, middle or high) when i hover over the marker.  Is there anyway that i can share this map with colleagues who don't have SAS so they can open it and experience the same functionality?  

 

I did save the .MHT file when saving SAS output, but that file extension can't be emailed through my organization's email account.  Any recommendations for sharing maps with others (ODS, etc.)?

 

Thanks,

 

Jason


Since you already have an .mht file, which likely the best for this, then I would try placing the file into a ZIP archive and see if the email will allow that.

jsberger
Obsidian | Level 7

Thanks ballardw,

 

Good suggestion.  I did test with one colleague, who reported that the MHT file, when opened in Explorer, still didn't have the hover functionality.  I suspect this is a explorer version issue, but if anyone has experienced something similar, thoughts are appreciated.

 

Jason

ballardw
Super User

@jsberger wrote:

Thanks ballardw,

 

Good suggestion.  I did test with one colleague, who reported that the MHT file, when opened in Explorer, still didn't have the hover functionality.  I suspect this is a explorer version issue, but if anyone has experienced something similar, thoughts are appreciated.

 

Jason


The few time I have used this functionality I had no problem using Internet Explorer 10 or 11.

 

You should probably post the ODS HTML code you used to create the output . I think that if you are using default HTML as generated without and ODS HTML (or other HTML destination) explicitly then the HTML does not contain the proper links for HTM. I think I had a similar issue when working with this first and had to add explicit

 

ods html path="<path>" body="map.htm"

style=sasweb;

<gmap code>

ods html close;

 

to be able to share with a colleague.

jsberger
Obsidian | Level 7

I'm embedding the code below that i used to generate the HTM file. I've tried sending the MHT file as an attachment and inside of a zipped folder as well.  The recipient reported seeing the map complete with markers, but the 'hover' feature did not work. 

 

**create annotation file;
data anno_locations;
set geocoded;
length function style color text$ 15;
xsys='2'; ysys='2'; hsys='3'; when='a';
function='symbol'; style='marker'; text="C"; size=2.0;
if school_level="Elementary" then color='vigb';
if school_level="Middle" then color='VIOY';
if school_level="High" then color='STR';
if school_level="Early Childhood" then color='STY';
if school_level="Alternative" then color='VIYPK';
output;
length html $300;
html='title='||quote(trim(left(campus_name))||'0d'x||trim(left(school_level))); output;
run;

**create legend;
data legend;
length function style color text$ 15;
retain xsys '5' ysys '5' when 'A';
**elementary;
function='move'; x=80;y=18;output;
function='symbol'; style='marker'; text="C"; size=1.0; color='vigb'; output;
function='move'; x=85;y=18;output;
function='label'; style='swissb'; size=1.0; position='6'; color='black'; text='Elementary';output;
**middle;
function='move'; x=80;y=15;output;
function='symbol'; style='marker'; text="C"; size=1.0; color='VIOY'; output;
function='move'; x=85;y=15;output;
function='label'; style='swissb'; size=1.0; position='6'; color='black'; text='Middle';output;
**high;
function='move'; x=80;y=12;output;
function='symbol'; style='marker'; text="C"; size=1.0; color='STR'; output;
function='move'; x=85;y=12;output;
function='label'; style='swissb'; size=1.0; position='6'; color='black'; text='High';output;
**early childhood;
function='move'; x=80;y=9;output;
function='symbol'; style='marker'; text="C"; size=1.0; color='STY'; output;
function='move'; x=85;y=9;output;
function='label'; style='swissb'; size=1.0; position='6'; color='black'; text='Early Childhood';output;
**alternative;
function='move'; x=80;y=6;output;
function='symbol'; style='marker'; text="C"; size=1.0; color='VIYPK'; output;
function='move'; x=85;y=6;output;
function='label'; style='swissb'; size=1.0; position='6'; color='black'; text='Alternative';output;
run;

/*combine anno and legend*/
data anno2;
set anno_locations legend;
run;

ods html path="C:\Users\jscho\Dropbox\icf\houston_tsl\data\analysis\map_tsl_locations\" body="hisd_map.htm" style=sasweb;
**right-click and save as web-archive single file;
proc gmap data=hisd_hs_bound map=hisd_hs_bound anno=anno2;
id _id_;
choro segment / levels=1 nolegend coutline=gray99;
run; quit;
ods html close;

ballardw
Super User

One last idea and then I'm out if it doesn't work.

Examine the htm code in an editor and find the image file name. Copy the actual image file ensuring that it has the same name, email to your coworker and have him/her place it in the same folder they saved the htm to.

I  know the htm should have stored the image but stuff happens sometimes.

GraphGuy
Meteorite | Level 14

If you're emailing the output, you might try this relatively new html5 technique:

https://blogs.sas.com/content/sastraining/2013/11/06/sas-9-4-has-a-new-way-to-send-interactive-graph...

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 837 views
  • 0 likes
  • 3 in conversation