<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Proc Gmap to ODS PDF - OSM tiles do not appear in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Gmap-to-ODS-PDF-OSM-tiles-do-not-appear/m-p/582296#M165600</link>
    <description>&lt;P&gt;The OSM tiles still did not appear when I removed the annotations and when I wrote the annotations first.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I got it to work by writing the OSM tiles first. Thank you for that suggestion.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just added the following after the Proc Display.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA mannoosm;
	SET mannoosm; 
	WHEN = 'B';
	run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 20 Aug 2019 00:45:18 GMT</pubDate>
    <dc:creator>chelepi</dc:creator>
    <dc:date>2019-08-20T00:45:18Z</dc:date>
    <item>
      <title>Proc Gmap to ODS PDF - OSM tiles do not appear</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Gmap-to-ODS-PDF-OSM-tiles-do-not-appear/m-p/581313#M165209</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am having trouble outputting a GMAP procedure to a PDF file when using tiles from Open Street Map in SAS v9.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the gmap procedure to ODS listing, the map appears as it should (image attached):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ods listing.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31759i8723CD4FE0705AE9/image-size/large?v=v2&amp;amp;px=999" role="button" title="ods listing.PNG" alt="ods listing.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31760i8AE6D155D3EEF80F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try to use ODS PDF the background image tiles do not appear. Only the annotated "dots" appear.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the SAS annotate generator, described in the paper "Google-Like Maps in SAS" by Darrell Massengill. The code for the OSM annotate generator is available here:&amp;nbsp;&lt;A href="http://support.sas.com/rnd/papers/sasgf13/GooglelikeMaps.zip&amp;nbsp;" target="_blank"&gt;http://support.sas.com/rnd/papers/sasgf13/GooglelikeMaps.zip&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*location of the programs */
libname OAG 'H:\GooglelikeMaps\AFpgm';


/*Reset macro variables*/
%include 'H:\GooglelikeMaps\AFpgm\OAG_reset.sas';

/* Subdivision Residences */
data residences;
input y x rec_no;
cards;
35.8997 -75.6403 1
35.8937 -75.6448 2
35.9096 -75.6463 3
;
run;



/*-----------------------------------------------------------*/
/* Macro to create point data in an annotate data set*/
%macro make_dots(annodata, inputdata, color, size, tipvar); 
data &amp;amp;annodata;
length function color $ 8 style $20 position $ 1 text $ 60 html $1024;
retain xsys ysys '2' hsys '3' when 'a' size .7;
set &amp;amp;inputdata;
/*optional arguments*/
%if (&amp;amp;size ^= ) %then %do;
size=&amp;amp;size;
%end;
/* All annotate points are 360-degree pies. */
function='pie';
rotate=360;
style='psolid';
color=&amp;amp;color;

/* optional tool tips */
%if (&amp;amp;tipvar ^= ) %then %do;
html= 'title=' || quote("&amp;amp;tipvar" ||'=' || 
trim(left(&amp;amp;tipvar)) );
%end;


output;
/* Draw an outline around each 'dot' */
color="gray55"; style='pempty';
output;
run;
%mend;

/*-----------------------------------------------------------*/




/* Create annotate data set of dots at locations */
%make_dots(annodots, residences,'RED');





/* Set the macro variables for the OSM Generator */
%let _backgroundonly='YES';
%let _inannods=annodots;
%let _outannods=mannodots;
%let _outmapds=mmap;
%let _outannoOSMds=work.mannoosm;
%let _imageloc='/cma/nshare/bokerson/OSMMaps/';
%let _xpixels=800;
%let _ypixels=600;
%let _autoproject='Y';
%let _tileserv="SAS";
goptions reset;
goptions xpixels=&amp;amp;_xpixels ypixels=&amp;amp;_ypixels xmax=12in ymax=9in;


/* Generate background image */
PROC DISPLAY cat=OAG.osmmapanno.osm_anno_gen.scl; run;


/*Combine the annotate data sets - The background and the dots*/
data bothanno;
set &amp;amp;_outannoOSMds mannodots;
run;


/* Generate the map*/
ODS _all_ CLOSE;
ODS PDF file="H:\output\testgroup1.pdf" STARTPAGE = NO NOGTITLE;
pattern;
pattern v=me c=A00000000 r=100;
PROC GMAP map=&amp;amp;_outmapds anno=bothanno data=&amp;amp;_outmapds all;
id id;
choro id /nolegend name="PC_ALT";
run;
quit;
ODS PDF CLOSE;
ODS LISTING;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 23:22:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Gmap-to-ODS-PDF-OSM-tiles-do-not-appear/m-p/581313#M165209</guid>
      <dc:creator>chelepi</dc:creator>
      <dc:date>2019-08-14T23:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap to ODS PDF - OSM tiles do not appear</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Gmap-to-ODS-PDF-OSM-tiles-do-not-appear/m-p/581619#M165328</link>
      <description>&lt;P&gt;What happens if there are no annotations?&lt;/P&gt;
&lt;P&gt;What happens if the annotations are written first (WHEN='B') ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 22:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Gmap-to-ODS-PDF-OSM-tiles-do-not-appear/m-p/581619#M165328</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-08-15T22:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gmap to ODS PDF - OSM tiles do not appear</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Gmap-to-ODS-PDF-OSM-tiles-do-not-appear/m-p/582296#M165600</link>
      <description>&lt;P&gt;The OSM tiles still did not appear when I removed the annotations and when I wrote the annotations first.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I got it to work by writing the OSM tiles first. Thank you for that suggestion.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just added the following after the Proc Display.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA mannoosm;
	SET mannoosm; 
	WHEN = 'B';
	run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Aug 2019 00:45:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Gmap-to-ODS-PDF-OSM-tiles-do-not-appear/m-p/582296#M165600</guid>
      <dc:creator>chelepi</dc:creator>
      <dc:date>2019-08-20T00:45:18Z</dc:date>
    </item>
  </channel>
</rss>

