<?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: Check to see if AGSFeatureLayer loaded successfully in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568223#M4891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually, I found a way. I checked for the cred.token length after initializing AGSMapServiceInfo.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If it has a token, It authenticated. If not, No go. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help today!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Mar 2012 21:21:42 GMT</pubDate>
    <dc:creator>DarrenMackiewicz</dc:creator>
    <dc:date>2012-03-02T21:21:42Z</dc:date>
    <item>
      <title>Check to see if AGSFeatureLayer loaded successfully</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568214#M4882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If I'm using this syntax to grab a reference to an AGSFeatureLayer, what is the best way to test to see if the layer actually loaded successfully?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I know the way to do this for an AGSDynamicMapServiceLayer, but not for AGSFeatureLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSURL* fURL = [NSURL URLWithString: featureLayerURL];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.activeFeatureLayer = [AGSFeatureLayer featureServiceLayerWithURL:fURL mode: AGSFeatureLayerModeOnDemand];&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 19:13:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568214#M4882</guid>
      <dc:creator>DarrenMackiewicz</dc:creator>
      <dc:date>2012-03-02T19:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Check to see if AGSFeatureLayer loaded successfully</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568215#M4883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If self.activeFeatureLayer.loaded property is TRUE then it is loaded successfully.&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>Fri, 02 Mar 2012 19:19:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568215#M4883</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-03-02T19:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Check to see if AGSFeatureLayer loaded successfully</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568216#M4884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to catch the case where, let's say the Feature Service is not available or turned off. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This happens ....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NSURL* fURL = [NSURL URLWithString: featureLayerURL];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;self.activeFeatureLayer = [AGSFeatureLayer featureServiceLayerWithURL:fURL mode: AGSFeatureLayerModeOnDemand]; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then - right here - I want to see if the activeFeatureLayer is valid. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can only use the self.activeFeatureLayer.loaded property AFTER the didLoadLayerForLayerView delegate fires. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can test this for a MapService layer, but testing to see if the AGSMapServiceInfo.layerInfos count is &amp;gt; 0, BEFORE I self.mapView.addMapLayer (AGSDynamicMapServiceLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to do the same thing for the Feature Service - but it doesn't appear to have any properties populated after these two commands are run. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NSURL* fURL = [NSURL URLWithString: featureLayerURL];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;self.activeFeatureLayer = [AGSFeatureLayer featureServiceLayerWithURL:fURL mode: AGSFeatureLayerModeOnDemand];&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 19:32:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568216#M4884</guid>
      <dc:creator>DarrenMackiewicz</dc:creator>
      <dc:date>2012-03-02T19:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Check to see if AGSFeatureLayer loaded successfully</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568217#M4885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okie..so you want to know about the validity of the feature layer before adding it to map. For that you must use synchronous constructor of the feature layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Q: How to find whether constructor is synchronous or asynchronous?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A: Method which takes "error" parameter are synchronous.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should initialize AGSFeatureLayer with &lt;/SPAN&gt;&lt;STRONG&gt;initWithURL:mode:credential:error:&lt;/STRONG&gt;&lt;SPAN&gt; method and then check the loaded property before adding to the map. If it's invalid layer then error object will have some information.&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>Fri, 02 Mar 2012 19:43:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568217#M4885</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-03-02T19:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Check to see if AGSFeatureLayer loaded successfully</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568218#M4886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Conceptually, I'm with you. But I can't find the syntax to do that.....?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 20:11:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568218#M4886</guid>
      <dc:creator>DarrenMackiewicz</dc:creator>
      <dc:date>2012-03-02T20:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Check to see if AGSFeatureLayer loaded successfully</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568219#M4887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Never mind. Found it&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;self.activeFeatureLayer = [[AGSFeatureLayer alloc] initWithURL:fURL mode:AGSFeatureLayerModeOnDemand error:nError];&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 20:13:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568219#M4887</guid>
      <dc:creator>DarrenMackiewicz</dc:creator>
      <dc:date>2012-03-02T20:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Check to see if AGSFeatureLayer loaded successfully</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568220#M4888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is the syntax..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NSError *error = nil; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;self.featureLayer = [[AGSFeatureLayer alloc] initWithURL:[NSURL URLWithString:@"url"] mode:AGSFeatureLayerModeOnDemand credential:nil error:&amp;amp;error];&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>Fri, 02 Mar 2012 20:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568220#M4888</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-03-02T20:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Check to see if AGSFeatureLayer loaded successfully</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568221#M4889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The error that I currently have set up is to tell if the service is not available due to a CONNECTIVITY issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way, when I initiate the map service and send credentials (token) - to tell if the Feature Service failed to load due to the credential being wrong, rather than bad connectivity?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 20:42:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568221#M4889</guid>
      <dc:creator>DarrenMackiewicz</dc:creator>
      <dc:date>2012-03-02T20:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Check to see if AGSFeatureLayer loaded successfully</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568222#M4890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What is the exact error message you get?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you working with map service or feature layer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any security set on the service?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Elaborate your requirements please...&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>Fri, 02 Mar 2012 21:01:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568222#M4890</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-03-02T21:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Check to see if AGSFeatureLayer loaded successfully</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568223#M4891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually, I found a way. I checked for the cred.token length after initializing AGSMapServiceInfo.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If it has a token, It authenticated. If not, No go. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help today!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 21:21:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/check-to-see-if-agsfeaturelayer-loaded/m-p/568223#M4891</guid>
      <dc:creator>DarrenMackiewicz</dc:creator>
      <dc:date>2012-03-02T21:21:42Z</dc:date>
    </item>
  </channel>
</rss>

