Hello all, Hello SAS technical support, By using “Proc SGMAP”, I created an U.S. map by state with version of ODS html5 file so that I can drill-down to any self-defined geo-area within single state map(total 49) if left mouse-clicking on the area of that state. I can navigate those maps for myself within SAS system without any issue. However, since most of my stakeholders who need to visualize those maps don’t have SAS system installed on their PC, thus I copied all of maps into the designated internal shared drive/folder. But it doesn’t work well and experiences unbearable long-time delay to open the html file for any state that has its size is greater than 3MB. The larger the size of file, the longer time to delay. Any ideas how I can open them quickly and what's the catch? Below you can find my SAS code. Thanks so much for any help in advance. Ethan **********************************SAS code for creating U.S. map by state *********************; %let drive=c:\temp; libname data "&drive"; filename odsout "&drive."; %let nameus=USMAP; %put &nameus.; %let colorlist=cx4dac26 cxb8e186 cyan cxf1b6da cxd01c8b; ods path(prepend) work.templat(update); proc template; define style mystyle; parent=styles.htmlblue; class GraphValueText / font = (Arial,7.5pt,Bold) color = black; end; run; data plot_usdata; set mapssas.uscenter; if state ^in(2,15,72) and ocean^='Y'; long = -long; statename = fipstate(state); run; data US_state;set data.US_state; length mylink $100; mylink= 'c:\temp\'||compress(STATECODE)||'map.html'; run; ods _all_ close; ods html5 path=odsout file="&nameus..html" options(bitmap_mode="inline") style=mystyle nogtitle; ods graphics on / reset antialiasmax=2000 tipmax=2000 imagemap=on width=900px height=700px noborder; TITLE1 justify=c color=purple height=19pt font='arial/bo' "U.S. Map" height=19pt color=dodgerblue " " height=19pt color=purple " " height=19pt color=dodgerblue " for Index"; title2 h=1pt " " ; footnote f="arial/bo" h=4.5pt " " ; footnote3 f="arial/bo" h=1.8pct color=blue justify=left " " justify=R h=1.8pct c=gray55 "%left(%qsysfunc(time(),tod7.)) %left(%qsysfunc(today(),weekdatx30.)) "; proc sgmap mapdata=mapsgfk.us maprespdata=US_state plotdata=plot_usdata; choromap index / id=statecode mapid=statecode lineattrs=(thickness=0.5 color=grayaa) transparency=.01 tip=(state tot_pop median_income index ) TIPLABEL=('State' 'Total Population' 'Median Household Income($)' 'Index' ) colormodel=(&colorlist.) name="&nameus." url=mylink; gradlegend "&nameus." / title="Index" TITLEATTRS=(Color=darkblue Family=Arial Size=9.5 Style=normal Weight=Bold) ; text x=x y=y text=statename / textattrs=(size=5.5pt color=black); run; quit; ods html5 close; ods preferences; **********************************SAS code for self-defined geo-area within single state map (e.g in NC) *********************; %let drive=c:\temp; libname data "&drive"; filename odsout "&drive."; %let namest=NCMAP; %put &namest.; %macro stateloop(state); %let colorlist=cx4dac26 cxb8e186 cyan cxf1b6da cxd01c8b; ods path(prepend) work.templat(update); proc template; define style mystyle; parent=styles.htmlblue; class GraphValueText / font = (Arial,7.5pt,Bold) color = black; end; run; ods _all_ close; ods html5 path=odsout file="&namest..html" options(bitmap_mode="inline") style=mystyle nogtitle; ods graphics on / reset=all outputfmt=png imagemap tipmax=25000 width=900px height=700px noborder; TITLE1 justify=c color=dodgerblue height=17pt font='arial/bo' "Map in" height=17pt color=dodgerblue " " height=17pt color=purple " &stname." height=17pt color=dodgerblue " for Index"; title2 h=14pt " " ; footnote f="arial/bo" h=4.5pt " " ; footnote3 justify=R h=1.8pct c=gray55 "%left(%qsysfunc(time(),tod7.)) %left(%qsysfunc(today(),weekdatx30.)) "; proc sgmap mapdata=data.NC_state maprespdata=data.NC_reported_data plotdata=data.NC_overlay_text; esrimap url="https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"; styleattrs datacolors=(&colorlist.); choromap &EQ. / mapid=lta_id id=lta_id lineattrs=(thickness=0.5 color=grayaa) transparency=.01 tip=(LTA_ID tot_pop LTA_income index rank) TIPLABEL=('ID' 'Total Population' 'Median Household Income($)' ' Index' 'Index Ranking') colormodel=(&colorlist.) name="&namest."; gradlegend "&namest." / title="Index" TITLEATTRS=(Color=darkblue Family=Arial Size=9.5 Style=normal Weight=Bold) ; series x=outlinex y=outliney / group=grp lineattrs=(color=black thickness=0.03px); run; quit; title1 h=15pt "Ranked by Index in" "A0"x height=15pt color=purple "&stname." ; title2 color=grey h=8pt "(in descending order)"; footnote; options pagesize=1000 nobyline; proc report data=data.NC_reported_data style(header)=[background=white foreground=gray33] split='*' STYLE(REPORT)={background=white font_size=1.2 cellpadding=2.6pt cellspacing=0pt} STYLE(HEADER)={foreground=purple background=lightblue font_weight=bold font_size=9.5pt} STYLE(COLUMN)={background=beige foreground=black font_size=1.8}; column ((" -- Area --" LTA ) ("Demo" tot_pop tot_birth LTA_income) (" " index rank) ); define LTA / "ID#" STYLE(COLUMN)={background=beige} width=9; define tot_pop / analysis sum "Total Population" STYLE(COLUMN)={background=aliceblue}; define LTA_income /analysis mean "Median Household Income" STYLE(COLUMN)={background=aliceblue}; define index/ analysis mean "Index" format=comma7.0 STYLE(COLUMN)={background=wheat} width=5; define rank/ "Ranking" STYLE(COLUMN)={background=wheat font_size=1.0} ; rbreak after / summarize style=[font_weight=bold]; compute after; LTA= 'Summary'; endcomp; run; quit; ods html5 close; ods preferences; %mend stateloop; %stateloop(NC);
... View more