<?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 Bug rendering Text symbol. in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/bug-rendering-text-symbol/m-p/2062#M10</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working in an application that have to label some polygons. I was wondering why some of the labels was not showing, until after tracing the bug I found that for the specific polygons where the label was not rendered the labelPointForPolygon function of the AGSGeometryEngine return a point with a valid X but with a Y totally outside of the world boundaries. I think that maybe the issue is related with the projection that I am using, some how. There is the code that reproduce the bug:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
NSString* wtkNAN83HARNWashintongNort = [NSString stringWithString:@"PROJCS[""NAD_1983_HARN_StatePlane_Washington_North_FIPS_4601_Feet"",GEOGCS[""GCS_North_American_1983_HARN"",DATUM[""D_North_American_1983_HARN"",SPHEROID[""GRS_1980"",6378137.0,298.257222101]],PRIMEM[""Greenwich"",0.0],UNIT[""Degree"",0.0174532925199433]],PROJECTION[""Lambert_Conformal_Conic""],PARAMETER[""False_Easting"",1640416.666666667],PARAMETER[""False_Northing"",0.0],PARAMETER[""Central_Meridian"",-120.8333333333333],PARAMETER[""Standard_Parallel_1"",47.5],PARAMETER[""Standard_Parallel_2"",48.73333333333333],PARAMETER[""Latitude_Of_Origin"",47.0],UNIT[""Foot_US"",0.3048006096012192]]"];
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSSpatialReference* originalProjection = [AGSSpatialReference spatialReferenceWithWKT:wtkNAN83HARNWashintongNort];
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGeometryEngine * geoEngine = [AGSGeometryEngine defaultGeometryEngine];
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSMutablePolygon* polygone = [[AGSMutablePolygon alloc] initWithSpatialReference:originalProjection];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addRingToPolygon];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addPointToRing:[AGSPoint pointWithX:1301118.94 y:191402.517 spatialReference:nil]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addPointToRing:[AGSPoint pointWithX:1301118.94 y:191415.36 spatialReference:nil]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addPointToRing:[AGSPoint pointWithX:1301131.732 y:191415.365 spatialReference:nil]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addPointToRing:[AGSPoint pointWithX:1301131.732 y:191402.517 spatialReference:nil]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addPointToRing:[AGSPoint pointWithX:1301118.94 y:191402.517 spatialReference:nil]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPoint* pointForLabel = [geoEngine labelPointForPolygon:polygone];
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Point for label X: %f", pointForLabel.x); // the x is a nomal value between 1301118.94 and 1301131.732 
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Point for label Y: %f", pointForLabel.y); // the y is a very wrong. it like 8888888889898888888888888888888888888888888 that is the bug....
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // user a symbol like this to you can see the in the map that the polygon is visible but the text is not.
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSCompositeSymbol* myMarkerPolySymbol = [[AGSCompositeSymbol alloc] init];
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSTextSymbol* textSymbol = [AGSTextSymbol textSymbolWithTextTemplate:@"this text don't appear" color:[UIColor redColor]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSSimpleFillSymbol* fill = [AGSSimpleFillSymbol simpleFillSymbol];
&amp;nbsp;&amp;nbsp;&amp;nbsp; fill.color = [UIColor colorWithRed:0.8 green:0.3 blue:0.3 alpha:0.2];
&amp;nbsp;&amp;nbsp;&amp;nbsp; fill.outline.color = [UIColor redColor];
&amp;nbsp;&amp;nbsp;&amp;nbsp; fill.style = AGSSimpleFillSymbolStyleBackwardDiagonal;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [myMarkerPolySymbol.symbols addObject:fill];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [myMarkerPolySymbol.symbols addObject:textSymbol];

// if copy this code please note that I don't add the release for any of the alloc's and I am not adding (in this code) the polygon to any graphic layer, just using the NSLog to see the values.&amp;nbsp; 
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Oct 2011 15:39:03 GMT</pubDate>
    <dc:creator>DanielRojas</dc:creator>
    <dc:date>2011-10-20T15:39:03Z</dc:date>
    <item>
      <title>Bug rendering Text symbol.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/bug-rendering-text-symbol/m-p/2062#M10</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working in an application that have to label some polygons. I was wondering why some of the labels was not showing, until after tracing the bug I found that for the specific polygons where the label was not rendered the labelPointForPolygon function of the AGSGeometryEngine return a point with a valid X but with a Y totally outside of the world boundaries. I think that maybe the issue is related with the projection that I am using, some how. There is the code that reproduce the bug:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
NSString* wtkNAN83HARNWashintongNort = [NSString stringWithString:@"PROJCS[""NAD_1983_HARN_StatePlane_Washington_North_FIPS_4601_Feet"",GEOGCS[""GCS_North_American_1983_HARN"",DATUM[""D_North_American_1983_HARN"",SPHEROID[""GRS_1980"",6378137.0,298.257222101]],PRIMEM[""Greenwich"",0.0],UNIT[""Degree"",0.0174532925199433]],PROJECTION[""Lambert_Conformal_Conic""],PARAMETER[""False_Easting"",1640416.666666667],PARAMETER[""False_Northing"",0.0],PARAMETER[""Central_Meridian"",-120.8333333333333],PARAMETER[""Standard_Parallel_1"",47.5],PARAMETER[""Standard_Parallel_2"",48.73333333333333],PARAMETER[""Latitude_Of_Origin"",47.0],UNIT[""Foot_US"",0.3048006096012192]]"];
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSSpatialReference* originalProjection = [AGSSpatialReference spatialReferenceWithWKT:wtkNAN83HARNWashintongNort];
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGeometryEngine * geoEngine = [AGSGeometryEngine defaultGeometryEngine];
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSMutablePolygon* polygone = [[AGSMutablePolygon alloc] initWithSpatialReference:originalProjection];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addRingToPolygon];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addPointToRing:[AGSPoint pointWithX:1301118.94 y:191402.517 spatialReference:nil]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addPointToRing:[AGSPoint pointWithX:1301118.94 y:191415.36 spatialReference:nil]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addPointToRing:[AGSPoint pointWithX:1301131.732 y:191415.365 spatialReference:nil]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addPointToRing:[AGSPoint pointWithX:1301131.732 y:191402.517 spatialReference:nil]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygone addPointToRing:[AGSPoint pointWithX:1301118.94 y:191402.517 spatialReference:nil]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPoint* pointForLabel = [geoEngine labelPointForPolygon:polygone];
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Point for label X: %f", pointForLabel.x); // the x is a nomal value between 1301118.94 and 1301131.732 
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Point for label Y: %f", pointForLabel.y); // the y is a very wrong. it like 8888888889898888888888888888888888888888888 that is the bug....
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // user a symbol like this to you can see the in the map that the polygon is visible but the text is not.
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSCompositeSymbol* myMarkerPolySymbol = [[AGSCompositeSymbol alloc] init];
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSTextSymbol* textSymbol = [AGSTextSymbol textSymbolWithTextTemplate:@"this text don't appear" color:[UIColor redColor]];
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSSimpleFillSymbol* fill = [AGSSimpleFillSymbol simpleFillSymbol];
&amp;nbsp;&amp;nbsp;&amp;nbsp; fill.color = [UIColor colorWithRed:0.8 green:0.3 blue:0.3 alpha:0.2];
&amp;nbsp;&amp;nbsp;&amp;nbsp; fill.outline.color = [UIColor redColor];
&amp;nbsp;&amp;nbsp;&amp;nbsp; fill.style = AGSSimpleFillSymbolStyleBackwardDiagonal;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [myMarkerPolySymbol.symbols addObject:fill];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [myMarkerPolySymbol.symbols addObject:textSymbol];

// if copy this code please note that I don't add the release for any of the alloc's and I am not adding (in this code) the polygon to any graphic layer, just using the NSLog to see the values.&amp;nbsp; 
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 15:39:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/bug-rendering-text-symbol/m-p/2062#M10</guid>
      <dc:creator>DanielRojas</dc:creator>
      <dc:date>2011-10-20T15:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bug rendering Text symbol.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/bug-rendering-text-symbol/m-p/2063#M11</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wonder if an error message would be returned if wtkNAN83HARNWashintongNort was not created properly...?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first layer that gets added to your map, does it match the wtkNAN83HARNWashintongNort projection? If not you might try making sure they match just as a test.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 18:32:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/bug-rendering-text-symbol/m-p/2063#M11</guid>
      <dc:creator>PaulLohr</dc:creator>
      <dc:date>2011-10-20T18:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bug rendering Text symbol.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/bug-rendering-text-symbol/m-p/2064#M12</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Daniel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for reporting. We'll look into it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 22:02:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/bug-rendering-text-symbol/m-p/2064#M12</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2011-10-20T22:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Bug rendering Text symbol.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/bug-rendering-text-symbol/m-p/2065#M13</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes it match the same projection. I am using this projection for all the layers, and actually I have a big list of polygons, that are very similar (that are all over the map) that show the label correctly. Was just some polygons, like the one I add here as test, that show this behavior.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I wonder if an error message would be returned if wtkNAN83HARNWashintongNort was not created properly...?&lt;BR /&gt;&lt;BR /&gt;The first layer that gets added to your map, does it match the wtkNAN83HARNWashintongNort projection? If not you might try making sure they match just as a test.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 03:38:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/bug-rendering-text-symbol/m-p/2065#M13</guid>
      <dc:creator>DanielRojas</dc:creator>
      <dc:date>2011-10-21T03:38:10Z</dc:date>
    </item>
  </channel>
</rss>

