title: SAS PROC GMAP Annotate Regions
body: <p>I am having difficulty annotating a map I have created using the Gmap procedure (SAS 9.4).</p>
  
  <p>I have a custom shape data set I have created for two regions (XX and YY).  XX is actually a disjoint region made up of two shapes.</p>
  
  <p>I am having two issues:</p>
  
  <ol>
  <li>The Proc is trying to draw the Area XX as one contiguous region, even though I've defined it as two separate subpolygons.</li>
  <li>The labels are not populating in the centroid of the shapes, even though I've tried using the %centroid macro to build the annotation set.  The coordinates look to be correct, but the text is not showing up in the right place.</li>
  </ol>
  
  <p>Here is the code I've put together.</p>
  
  <pre><code>data map;
      input Area $ Y X POINTORDER SUB_POLYGON_NUMBER POLYGON_NUMBER;
      cards;
  XX 1 1 1 1 1
  XX 2 1 2 1 1
  XX 3 1 3 1 1
  XX 3 2 4 1 1
  XX 3 3 5 1 1
  XX 2 3 6 1 1
  XX 1 3 7 1 1
  XX 1 2 8 1 1
  XX -1 0 1 2 1
  XX -2 0 2 2 1
  XX -1 -2 3 2 1
  YY 7 7 1 1 2
  YY 7 8 2 1 2
  YY 8 9 3 1 2
  ;
  run;
  
  data sales; 
      input Area $ Sales;
  datalines;
  XX 500
  YY 200
  ;
  run;
  
  %annomac;
  
  %CENTROID(map,anno,Area,segonly=1); 
  
  data anno;
      set anno;
      text=Area;
      function='label';
      style="'Albany AMT/bold'";
  run;
  
  proc gmap data = sales map=map;
    id Area;
    choro Sales / nolegend annotate=anno;
  run;
  quit;
  </code></pre>