<?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 not able to add a polyline to a graphics layer in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550857#M4723</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 trying to add a polyline to a graphics layer. But it is not getting displayed although it is not giving any error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is highly appreciated!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Suman&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code is as below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-(void)drawLine{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GisAppAppDelegate *mapDelegate =(GisAppAppDelegate *)[[UIApplication sharedApplication] delegate];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int i= [mapDelegate.geomObject count];// geomObject is a mutableArray in which I am storing the AGSPoint on map click&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(i &amp;gt;= 2){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSMutablePolyline *polyline = [[AGSMutablePolyline alloc] initWithSpatialReference:self.mapView.spatialReference];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AGSSimpleLineSymbol *ln1=[AGSSimpleLineSymbol simpleLineSymbol];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ln1.color = [UIColor colorWithRed:9 green:0 blue: 0 alpha:0.5];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ln1.width = 5.0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ln1.style = AGSSimpleLineSymbolStyleSolid;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [polyline addPathToPolyline];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int x1=0; x1&amp;lt; i; x1++) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; AGSPoint *mappoint= [self.geomObject objectAtIndex:x1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [polyline addPointToPath:[AGSPoint pointWithX:mappoint.x y:mappoint.y spatialReference:nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AGSGraphic *line=[[AGSGraphic alloc] initWithGeometry:polyline symbol:ln1 attributes:nil infoTemplateDelegate:nil];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.myGraphicsLayer removeAllGraphics];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [self.myGraphicsLayer addGraphic:line];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.myGraphicsLayer dataChanged];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Mar 2011 03:45:19 GMT</pubDate>
    <dc:creator>SumanChatterjee</dc:creator>
    <dc:date>2011-03-14T03:45:19Z</dc:date>
    <item>
      <title>not able to add a polyline to a graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550857#M4723</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 trying to add a polyline to a graphics layer. But it is not getting displayed although it is not giving any error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is highly appreciated!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Suman&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code is as below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-(void)drawLine{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GisAppAppDelegate *mapDelegate =(GisAppAppDelegate *)[[UIApplication sharedApplication] delegate];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int i= [mapDelegate.geomObject count];// geomObject is a mutableArray in which I am storing the AGSPoint on map click&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(i &amp;gt;= 2){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSMutablePolyline *polyline = [[AGSMutablePolyline alloc] initWithSpatialReference:self.mapView.spatialReference];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AGSSimpleLineSymbol *ln1=[AGSSimpleLineSymbol simpleLineSymbol];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ln1.color = [UIColor colorWithRed:9 green:0 blue: 0 alpha:0.5];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ln1.width = 5.0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ln1.style = AGSSimpleLineSymbolStyleSolid;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [polyline addPathToPolyline];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int x1=0; x1&amp;lt; i; x1++) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; AGSPoint *mappoint= [self.geomObject objectAtIndex:x1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [polyline addPointToPath:[AGSPoint pointWithX:mappoint.x y:mappoint.y spatialReference:nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AGSGraphic *line=[[AGSGraphic alloc] initWithGeometry:polyline symbol:ln1 attributes:nil infoTemplateDelegate:nil];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.myGraphicsLayer removeAllGraphics];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [self.myGraphicsLayer addGraphic:line];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.myGraphicsLayer dataChanged];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 03:45:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550857#M4723</guid>
      <dc:creator>SumanChatterjee</dc:creator>
      <dc:date>2011-03-14T03:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: not able to add a polyline to a graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550858#M4724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Suman,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please let me know following which will help to narrow down the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the spatial reference of the points stored in geomObject?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the map's spatial reference which you are assigning to the polyline?&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>Mon, 14 Mar 2011 16:48:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550858#M4724</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2011-03-14T16:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: not able to add a polyline to a graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550859#M4725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Nimesh,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks! I am using the map service from arcgisonline .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;static NSString *kMapServiceURL=@"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" rel="nofollow" target="_blank"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The spatial reference of the map as found in debugging is &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;wkid :4326&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;wkt:nil&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The spatial reference of the points stored in the NSMutableArray geomObject is :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;wkid:4326&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;wkt: out of scope.//although before getting added to the array the points have a wkt:nil&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the code that is getting fired on&amp;nbsp; clicking on the map and where the points are getting stored in the array.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- (void) mapView: (AGSMapView *) mapView didClickAtPoint: (CGPoint) screen mapPoint: (AGSPoint *) mappoint graphics: (NSDictionary *) graphics&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; // adding a point&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; GisAppAppDelegate *mapDelegate =(GisAppAppDelegate *)[[UIApplication sharedApplication] delegate];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; int k = [mapDelegate.geomObject count];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if (k == 0){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; NSMutableArray * geometryArray = [NSMutableArray array];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [geometryArray addObject: mappoint];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; mapDelegate.geomObject = geometryArray;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [mapDelegate.geomObject addObject:mappoint];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; [self drawLine];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 01:05:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550859#M4725</guid>
      <dc:creator>SumanChatterjee</dc:creator>
      <dc:date>2011-03-15T01:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: not able to add a polyline to a graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550860#M4726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If possible, can you please attach a sample project so I can look at it and help you with?&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>Tue, 15 Mar 2011 17:06:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550860#M4726</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2011-03-15T17:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: not able to add a polyline to a graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550861#M4727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Nimesh,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for taking so much pain. I am not able to attach the project here although the compressed project(.zip) is&amp;nbsp; 1.2 MB. Can you send me an email address where I can send the zipped project. It will be really very helpful as I got stuck in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Suman&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2011 01:46:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550861#M4727</guid>
      <dc:creator>SumanChatterjee</dc:creator>
      <dc:date>2011-03-16T01:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: not able to add a polyline to a graphics layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550862#M4728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Send it to &lt;/SPAN&gt;&lt;A href="mailto:njarecha@esri.com"&gt;njarecha@esri.com&lt;/A&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>Wed, 16 Mar 2011 04:08:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/not-able-to-add-a-polyline-to-a-graphics-layer/m-p/550862#M4728</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2011-03-16T04:08:22Z</dc:date>
    </item>
  </channel>
</rss>

