<?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 how can i get graphics from featurelayer in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-can-i-get-graphics-from-featurelayer/m-p/734925#M6605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;here is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSFeatureLayer* featureLayer = [AGSFeatureLayer featureServiceLayerWithURL:[NSURL URLWithString:featureURL] mode:AGSFeatureLayerModeOnDemand];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[self.mapView addMapLayer:featureLayer withName:@"feature"];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- (void) mapView:(AGSMapView *)mapView didLoadLayerForLayerView:(UIView&amp;lt; AGSLayerView &amp;gt; *) layerView{&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ([@"feature" isEqualToString:layerView.name]) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; AGSFeatureLayer *featureLayer = (AGSFeatureLayer *)layerView.agsLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; NSArray* ff = featureLayer.graphics;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; NSLog(@"%i", [ff count]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the graphics array count always 0.Is there something I did is wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Nov 2011 00:11:50 GMT</pubDate>
    <dc:creator>XiaoJing</dc:creator>
    <dc:date>2011-11-10T00:11:50Z</dc:date>
    <item>
      <title>how can i get graphics from featurelayer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-can-i-get-graphics-from-featurelayer/m-p/734925#M6605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;here is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSFeatureLayer* featureLayer = [AGSFeatureLayer featureServiceLayerWithURL:[NSURL URLWithString:featureURL] mode:AGSFeatureLayerModeOnDemand];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[self.mapView addMapLayer:featureLayer withName:@"feature"];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- (void) mapView:(AGSMapView *)mapView didLoadLayerForLayerView:(UIView&amp;lt; AGSLayerView &amp;gt; *) layerView{&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ([@"feature" isEqualToString:layerView.name]) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; AGSFeatureLayer *featureLayer = (AGSFeatureLayer *)layerView.agsLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; NSArray* ff = featureLayer.graphics;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; NSLog(@"%i", [ff count]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the graphics array count always 0.Is there something I did is wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 00:11:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-can-i-get-graphics-from-featurelayer/m-p/734925#M6605</guid>
      <dc:creator>XiaoJing</dc:creator>
      <dc:date>2011-11-10T00:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: how can i get graphics from featurelayer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-can-i-get-graphics-from-featurelayer/m-p/734926#M6606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are trying to get the graphics too soon. The graphics are not loaded in AGSFeatureLayer.graphics when layer is created. When layer is created and added to map, layer send a query to server to fetch the features. And after that you should try to get the graphics from feature layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&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>Wed, 16 Nov 2011 18:34:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-can-i-get-graphics-from-featurelayer/m-p/734926#M6606</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2011-11-16T18:34:47Z</dc:date>
    </item>
  </channel>
</rss>

