<?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: Callout and Attachment in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11134#M123</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;you can just cast it &lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
AGSFeatureLayer *featureLayer = (AGSFeatureLayer *)result.feature.layer;
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Oh, Ok! I will give it a try. Thx again Ed.. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:28:53 GMT</pubDate>
    <dc:creator>MiraMuliati</dc:creator>
    <dc:date>2021-12-10T20:28:53Z</dc:date>
    <item>
      <title>Callout and Attachment</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11130#M119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I am new to ArcGIS API for IOS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently, I am working on a project that show a callout and related attachment on feature layer. My application has some active featureserver layers. I perform identify task on the mapserver related to those featureserver. When I get AGSIdentifyResult on didExecuteWithIdentifyResults function, How do I know which featureserver the result.feature come from?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2011 14:02:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11130#M119</guid>
      <dc:creator>MiraMuliati</dc:creator>
      <dc:date>2011-10-05T14:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Callout and Attachment</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11131#M120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://help.arcgis.com/en/arcgismobile/10.0/apis/iOS/2.0/reference/interface_a_g_s_graphic.html"&gt;http://help.arcgis.com/en/arcgismobile/10.0/apis/iOS/2.0/reference/interface_a_g_s_graphic.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can access the featureLayer that the feature has come from by using the layer property: result.feature.layer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2011 14:19:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11131#M120</guid>
      <dc:creator>EddieJesinsky</dc:creator>
      <dc:date>2011-10-05T14:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Callout and Attachment</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11132#M121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;You can access the featureLayer that the feature has come from by using the layer property: result.feature.layer&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx, Eddie. What i have in my mind is i will call queryAttachmentInfosForObjectId on the feature layer related to AGSIdentifyResult in didExecuteWithIdentifyResults.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;result.feature.layer returns AGSGraphicsLayer. How could i get AGSFeatureLayer related to this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2011 14:50:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11132#M121</guid>
      <dc:creator>MiraMuliati</dc:creator>
      <dc:date>2011-10-05T14:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Callout and Attachment</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11133#M122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;you can just cast it &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
AGSFeatureLayer *featureLayer = (AGSFeatureLayer *)result.feature.layer;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:28:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11133#M122</guid>
      <dc:creator>EddieJesinsky</dc:creator>
      <dc:date>2021-12-10T20:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Callout and Attachment</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11134#M123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;you can just cast it &lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
AGSFeatureLayer *featureLayer = (AGSFeatureLayer *)result.feature.layer;
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Oh, Ok! I will give it a try. Thx again Ed.. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:28:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11134#M123</guid>
      <dc:creator>MiraMuliati</dc:creator>
      <dc:date>2021-12-10T20:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Callout and Attachment</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11135#M124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got exception when casting AGSGraphicLayer to AGSFeatureLayer and call objectIdForFeature on casted AGSFeatureLayer. According to &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgismobile/10.0/apis/iOS/2.0/reference/interface_a_g_s_feature_layer.html#a9da677057ea6b7764506d45f9c9b59ef" rel="nofollow noopener noreferrer" target="_blank"&gt;API reference&lt;/A&gt;&lt;SPAN&gt;, AGSFeatureLayer is subclass of AGSGraphicLayer. Is it possible to cast superclass to subclass?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thus, I save all active feature layer in featureLayerArray and in didExecuteWithIdentifyResults i have :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
for (AGSIdentifyResult* result in results) {

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Retrieve attachment
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int objectId = -99;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (AGSFeatureLayer* currentFeatureLayer in self.featureLayerArray) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objectId = [currentFeatureLayer objectIdForFeature:result.feature];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"objectID : %d", objectId);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is i always get objectID = 0. Why?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:28:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/callout-and-attachment/m-p/11135#M124</guid>
      <dc:creator>MiraMuliati</dc:creator>
      <dc:date>2021-12-10T20:28:56Z</dc:date>
    </item>
  </channel>
</rss>

