I've dealt with the same issue for various projects and I FINALLY figured out what I was doing wrong. This will NOT work: ODS GRAPHICS / reset=index IMAGENAME="my_map" IMAGEFMT=png NOBORDER;
ODS HTML PATH="X:\abc\def" (URL=none);
PROC SGMAP MAPDATA=data1 MAPRESPDATA=data2 NOAUTOLEGEND;
ESRIMAP URL='http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base';
CHOROMAP abc / MAPID=def ID=def DISCRETE;
RUN; But this DOES work: ODS HTML PATH="X:\abc\def" (URL=none);
ODS GRAPHICS / reset=index IMAGENAME="my_map" IMAGEFMT=png NOBORDER;
PROC SGMAP MAPDATA=data1 MAPRESPDATA=data2 NOAUTOLEGEND;
ESRIMAP URL='http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base';
CHOROMAP abc / MAPID=def ID=def DISCRETE;
RUN; Note the order - as long as the ODS GRAPHICS statement is listed below/after the ODS HTML statement, then this works. If it's flipped like I showed in the first code snippet, the code will create a file called 'my_map1.png'.
... View more