<?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: Identify Task with Multiple LayerIDs in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488569#M4162</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your code looks correct. Here is the sample...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Download &lt;/SPAN&gt;&lt;A href="http://http://www.arcgis.com/home/item.html?id=6bef3f02c88e425db34650b4c4adc05d"&gt;Identify Task Sample&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Comment out code line in viewDidLoad as shown below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// set the visible layers on the layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//dynamicLayer.visibleLayers = [NSArray arrayWithObjects:[NSNumber numberWithInt:5], nil];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Change code line as below in mapView::didClickAtPoint from one layerIds to multiple.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//self.identifyParams.layerIds = [NSArray arrayWithObjects:[NSNumber numberWithInt:5], nil];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;self.identifyParams.layerIds = [NSArray arrayWithObjects:[NSNumber numberWithInt:1],[NSNumber numberWithInt:3],[NSNumber numberWithInt:4],[NSNumber numberWithInt:5], nil];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Test the sample. You'll see multiple results.&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, 06 Apr 2012 15:33:20 GMT</pubDate>
    <dc:creator>NimeshJarecha</dc:creator>
    <dc:date>2012-04-06T15:33:20Z</dc:date>
    <item>
      <title>Identify Task with Multiple LayerIDs</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488568#M4161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone have any sample code for using the identify task on more than one layerId?&amp;nbsp; I have the code working with a single layerId (as with all the samples I can find).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;self.identifyParams.layerIds = [NSArray arrayWithObjects:[NSNumber numberWithInt:0], nil];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to identify on multiple layers.&amp;nbsp; I've tried the following but it doesn't work.&amp;nbsp; Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;self.identifyParams.layerIds = [NSArray arrayWithObjects:[NSNumber numberWithInt:0], [NSNumber numberWithInt:1], [NSNumber numberWithInt:2],&amp;nbsp; nil];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2012 22:33:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488568#M4161</guid>
      <dc:creator>SteveLettau</dc:creator>
      <dc:date>2012-04-05T22:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Task with Multiple LayerIDs</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488569#M4162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your code looks correct. Here is the sample...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Download &lt;/SPAN&gt;&lt;A href="http://http://www.arcgis.com/home/item.html?id=6bef3f02c88e425db34650b4c4adc05d"&gt;Identify Task Sample&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Comment out code line in viewDidLoad as shown below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// set the visible layers on the layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//dynamicLayer.visibleLayers = [NSArray arrayWithObjects:[NSNumber numberWithInt:5], nil];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Change code line as below in mapView::didClickAtPoint from one layerIds to multiple.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//self.identifyParams.layerIds = [NSArray arrayWithObjects:[NSNumber numberWithInt:5], nil];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;self.identifyParams.layerIds = [NSArray arrayWithObjects:[NSNumber numberWithInt:1],[NSNumber numberWithInt:3],[NSNumber numberWithInt:4],[NSNumber numberWithInt:5], nil];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Test the sample. You'll see multiple results.&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, 06 Apr 2012 15:33:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488569#M4162</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-04-06T15:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Task with Multiple LayerIDs</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488570#M4163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nimesh, thanks for the reply.&amp;nbsp; I did as suggested (see screenshot), and now can make out county outlines in the states.&amp;nbsp; When I identify, however, I only see the same 50 attributes shown by the original example.&amp;nbsp; I also noticed that after I made the changes to the code suggested, the state name disappeared from the callout.&amp;nbsp; Not sure if that's related, but bottom line, in my case changing the code didn't app earl to show attributes from additional layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing to add, I'm using Xcode 4.3.2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Apr 2012 17:18:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488570#M4163</guid>
      <dc:creator>SteveLettau</dc:creator>
      <dc:date>2012-04-06T17:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Task with Multiple LayerIDs</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488571#M4164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steve,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just add a following code line in start of identifyTask::didExecuteWithIdentifyResults and you will see multiple results (see message on console). The sample shows callout and attributes for the first result only. You'll have to modify sample if you want to show attributes of all the results. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NSLog(@"results: %@",results);&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, 06 Apr 2012 18:15:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488571#M4164</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-04-06T18:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Task with Multiple LayerIDs</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488572#M4165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, I got it.&amp;nbsp; Thanks Nimesh.&amp;nbsp; I needed to step through the results to get each array.&amp;nbsp; Here's the code that worked:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSIdentifyResult *layer0Results = [results objectAtIndex:0];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSIdentifyResult *layer1Results = [results objectAtIndex:1];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSIdentifyResult *layer2Results = [results objectAtIndex:2];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and then to get specific attribute values:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *prop_city = [layer2Results.feature.attributes objectForKey:@"City"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *prop_state = [layer2Results.feature.attributes objectForKey:@"State"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *prop_zip = [layer2Results.feature.attributes objectForKey:@"Zip"];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:29:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488572#M4165</guid>
      <dc:creator>SteveLettau</dc:creator>
      <dc:date>2021-12-11T21:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Task with Multiple LayerIDs</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488573#M4166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great! Glad to know that you got it working! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&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, 06 Apr 2012 22:52:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488573#M4166</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-04-06T22:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Identify Task with Multiple LayerIDs</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488574#M4167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How about identifying all visible layers? I'm guessing you can get which layers are currently visible from each of the (Dynamic/Tiled)MapServiceLayers and use that array for the identifyParams.layerIds?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;**edit&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;nevermind, I found it. If we don't define layerIds and use layerOption = AGSIdentifyParametersLayerOptionVisible that should get what I need, though I'll have to get creative on iterating through all operational layers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2012 19:50:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/identify-task-with-multiple-layerids/m-p/488574#M4167</guid>
      <dc:creator>LukePhilips</dc:creator>
      <dc:date>2012-05-10T19:50:55Z</dc:date>
    </item>
  </channel>
</rss>

