<?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: Map unexpectedly zooms out when I try to add text in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Map-unexpectedly-zooms-out-when-I-try-to-add-text/m-p/898819#M43848</link>
    <description>&lt;P&gt;Try commenting out the Scatter statement and play with the coordinates of the TEXT until the text appears in the desired map area. My "guess" on the coordinates might still have had text appearing outside of the intended area because of the height of letters displayed, which might be a cause of the zoom. If you get the text to appear in the area without the scatter then add the scatter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might also need upper and lower limits on LON and not just LAT.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2023 15:32:55 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-10-16T15:32:55Z</dc:date>
    <item>
      <title>Map unexpectedly zooms out when I try to add text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Map-unexpectedly-zooms-out-when-I-try-to-add-text/m-p/898256#M43824</link>
      <description>&lt;P&gt;Hello SAS experts!&lt;BR /&gt;I'm trying to add a text at the bottom of my map:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="img0.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88791i103CD50944F4CC75/image-size/medium?v=v2&amp;amp;px=400" role="button" title="img0.png" alt="img0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the code i used to generate the map:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sgmap plotdata = veneto; 
openstreetmap;
where lon &amp;gt; 10.435428 and lat &amp;gt; 44.847916 and lat &amp;lt; 46.731138; 
scatter x =  lon y = lat / markerattrs=(color=black size=3 symbol=circlefilled); 
run; &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I'm trying to punt the text on the bottom of the map, I added a row with the longitude, latitude and text I want to put on the map.&lt;/P&gt;&lt;P&gt;This is how I made it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data made; 
lat = 44.847916; lon = 10.435428; text = 'Made by';
run; 

DATA veneto;
SET veneto made;
RUN;

proc sgmap plotdata = veneto; 
openstreetmap;
where lon &amp;gt; 10.435428 and lat &amp;gt; 44.847916 and lat &amp;lt; 46.731138; 
scatter x =  lon y = lat / markerattrs=(color=black size=3 symbol=circlefilled); 
TEXT Y=lon X=lat TEXT=text  /TEXTATTRS = (SIZE=12 COLOR='blue');
run; &lt;/PRE&gt;&lt;P&gt;The code doesn't generate errors, but when I run the code, the map zooms out and doesn't show any text.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="img0.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88792iC0AF25EAD9EA1A06/image-size/medium?v=v2&amp;amp;px=400" role="button" title="img0.png" alt="img0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What did I do wrong? How can I fix it?&lt;BR /&gt;Thank you a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I'm using SAS 9.4m6 release)&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;</description>
      <pubDate>Thu, 12 Oct 2023 09:58:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Map-unexpectedly-zooms-out-when-I-try-to-add-text/m-p/898256#M43824</guid>
      <dc:creator>veronicasalmaso</dc:creator>
      <dc:date>2023-10-12T09:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Map unexpectedly zooms out when I try to add text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Map-unexpectedly-zooms-out-when-I-try-to-add-text/m-p/898328#M43827</link>
      <description>&lt;P&gt;You defined your graph area with lat&amp;gt;44.847916 and then placed your text starting outside of that area at lat =44.847916. Similar with your lon setting. Such things may "confuse" the interface to map data provider.&lt;/P&gt;
&lt;P&gt;I suspect that if have the text appear inside the map area that may help. I might try the text at lat=44.85 and lon=10.44.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suggestion: Instead of lat &amp;gt; 44.847916 and lat &amp;lt; 46.731138 you might want to advantage of SAS ability to do comparisons like&amp;nbsp; 46.731138 &amp;gt; lat &amp;gt; 44.847916 . They will be much easier to follow when you haven't looked at this code for a while and may help when you need to change one element.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another. You might see just how many of those decimal places are actually needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thing I would suggest is to set the text size with a unit of measure such as:&lt;/P&gt;
&lt;PRE&gt;TEXT Y=lon X=lat TEXT=text  /TEXTATTRS = (SIZE=12&lt;STRONG&gt;&lt;FONT color="#008000"&gt;PT&lt;/FONT&gt;&lt;/STRONG&gt; COLOR='blue');&lt;/PRE&gt;
&lt;P&gt;The units for "size" can be a bit of a problem, especially if using code that may bury option settings&amp;nbsp; and in some cases can result in unreadable text. If you control the units then you don't run into text too small to see, default pixels is machine dependent and what appears okay running on one machine can render text next to invisible on ultrahigh resolution devices.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 14:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Map-unexpectedly-zooms-out-when-I-try-to-add-text/m-p/898328#M43827</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-10-12T14:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Map unexpectedly zooms out when I try to add text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Map-unexpectedly-zooms-out-when-I-try-to-add-text/m-p/898706#M43843</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; Thank you for your reply!&lt;BR /&gt;Your suggestions made the code easier to read. Unfortunately, even changing lat to 44.85 and lon to 10.44, the map stills zooms out like before the changes</description>
      <pubDate>Mon, 16 Oct 2023 08:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Map-unexpectedly-zooms-out-when-I-try-to-add-text/m-p/898706#M43843</guid>
      <dc:creator>veronicasalmaso</dc:creator>
      <dc:date>2023-10-16T08:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Map unexpectedly zooms out when I try to add text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Map-unexpectedly-zooms-out-when-I-try-to-add-text/m-p/898819#M43848</link>
      <description>&lt;P&gt;Try commenting out the Scatter statement and play with the coordinates of the TEXT until the text appears in the desired map area. My "guess" on the coordinates might still have had text appearing outside of the intended area because of the height of letters displayed, which might be a cause of the zoom. If you get the text to appear in the area without the scatter then add the scatter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might also need upper and lower limits on LON and not just LAT.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 15:32:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Map-unexpectedly-zooms-out-when-I-try-to-add-text/m-p/898819#M43848</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-10-16T15:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Map unexpectedly zooms out when I try to add text</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Map-unexpectedly-zooms-out-when-I-try-to-add-text/m-p/898883#M43859</link>
      <description>I tried both changing the coordinates to a point exactly in the middle of the map and also commenting out the scatter statement.&lt;BR /&gt;The text doesn't appear, even if use a bigger o smaller size. When I comment out the scatter, the map zooms in the middle of a lake, no matter what coordinates I put in (I even tried changing them to lat = 0 and lon = 0)</description>
      <pubDate>Tue, 17 Oct 2023 07:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Map-unexpectedly-zooms-out-when-I-try-to-add-text/m-p/898883#M43859</guid>
      <dc:creator>veronicasalmaso</dc:creator>
      <dc:date>2023-10-17T07:27:53Z</dc:date>
    </item>
  </channel>
</rss>

