<?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: Feature layer callouts in iOS in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/feature-layer-callouts-in-ios/m-p/365208#M3152</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, it turns out that I was missing setting outFields in the feature leayer:&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayer.&lt;SPAN style="color: #703daa;"&gt;outFields&lt;/SPAN&gt; = [&lt;SPAN style="color: #703daa;"&gt;NSArray&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;arrayWithObject&lt;/SPAN&gt;:&lt;SPAN style="color: #d12f1b;"&gt;@"*"&lt;/SPAN&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I did this, all the fields were accessible as attributes in the graphic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Aug 2014 13:55:25 GMT</pubDate>
    <dc:creator>KunalMehta</dc:creator>
    <dc:date>2014-08-04T13:55:25Z</dc:date>
    <item>
      <title>Feature layer callouts in iOS</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/feature-layer-callouts-in-ios/m-p/365206#M3150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am displaying one of the sample feature layers from ArcGIS online on my map and&amp;nbsp; I want to show a callout when a graphic on the feature layer is selected (tapped).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is a code snippet ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;- (&lt;SPAN class="s1"&gt;void&lt;/SPAN&gt;)viewDidLoad&lt;/P&gt;&lt;P class="p1"&gt;{&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;super&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &lt;/SPAN&gt;viewDidLoad&lt;SPAN class="s2"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;mapView&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;.&lt;/SPAN&gt;callout&lt;SPAN class="s2"&gt;.&lt;/SPAN&gt;delegate&lt;SPAN class="s2"&gt; = &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;self&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;NSURL&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; *featureLayerURL =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;NSURL&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;URLWithString&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;@"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://services.arcgis.com/oKgs2tbjK6zwTdvi/arcgis/rest/services/Major_World_Cities/FeatureServer/0" rel="nofollow" target="_blank"&gt;http://services.arcgis.com/oKgs2tbjK6zwTdvi/arcgis/rest/services/Major_World_Cities/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s1"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;AGSFeatureLayer&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; *featureLayer = [&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;AGSFeatureLayer&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &lt;/SPAN&gt;featureServiceLayerWithURL&lt;SPAN class="s1"&gt;:featureLayerURL &lt;/SPAN&gt;mode&lt;SPAN class="s1"&gt;:&lt;/SPAN&gt;AGSFeatureLayerModeOnDemand&lt;SPAN class="s1"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;SPAN class="s4"&gt;self&lt;/SPAN&gt;.&lt;SPAN class="s5"&gt;mapView&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;addMapLayer&lt;/SPAN&gt;:featureLayer &lt;SPAN class="s3"&gt;withName&lt;/SPAN&gt;:&lt;SPAN class="s6"&gt;@"CloudData"&lt;/SPAN&gt;];&lt;/P&gt;&lt;P class="p3"&gt;...&lt;/P&gt;&lt;P class="p3"&gt;}&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN style="line-height: 1.5;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;-(&lt;SPAN class="s1"&gt;BOOL&lt;/SPAN&gt;)callout:(&lt;SPAN class="s2"&gt;AGSCallout&lt;/SPAN&gt; *)callout willShowForFeature:(&lt;SPAN class="s1"&gt;id&lt;/SPAN&gt;&amp;lt;&lt;SPAN class="s2"&gt;AGSFeature&lt;/SPAN&gt;&amp;gt;)feature layer:(&lt;SPAN class="s2"&gt;AGSLayer&lt;/SPAN&gt;&amp;lt;&lt;SPAN class="s2"&gt;AGSHitTestable&lt;/SPAN&gt;&amp;gt; *)layer mapPoint:(&lt;SPAN class="s2"&gt;AGSPoint&lt;/SPAN&gt; *)mapPoint&lt;/P&gt;&lt;P class="p1"&gt;{&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;//Specify the callout's contents&lt;/P&gt;&lt;P class="p3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.mapView.callout.title = (NSString*)[feature attributeForKey:@"NAME"];&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.mapView.callout.detail =(NSString*)[feature attributeForKey:@"COUNTRY"];&lt;/P&gt;&lt;P class="p3"&gt;&lt;/P&gt;&lt;P class="p6"&gt;&lt;SPAN class="s3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;return&lt;SPAN class="s3"&gt; &lt;/SPAN&gt;YES&lt;SPAN class="s3"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;}&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;However this sets title and details as nil, even though when I call this from the desktop browser (&lt;A href="http://www.arcgis.com/home/webmap/viewer.html?url=http://services.arcgis.com/oKgs2tbjK6zwTdvi/ArcGIS/rest/services/Major_World_Cities/FeatureServer/0&amp;amp;source=sd" title="http://www.arcgis.com/home/webmap/viewer.html?url=http://services.arcgis.com/oKgs2tbjK6zwTdvi/ArcGIS/rest/services/Major_World_Cities/FeatureServer/0&amp;amp;source=sd"&gt;http://www.arcgis.com/home/webmap/viewer.html?url=http://services.arcgis.com/oKgs2tbjK6zwTdvi/ArcGIS/rest/services/Major_World_Cities/FeatureServer/0&amp;amp;source=sd&lt;/A&gt;‌) it shows the name, country and other attributes.&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;What am I missing here? Is there a way to show the attributes/fields of the feature being selected? Any examples will be helpful too.&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 18:19:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/feature-layer-callouts-in-ios/m-p/365206#M3150</guid>
      <dc:creator>KunalMehta</dc:creator>
      <dc:date>2014-08-01T18:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Feature layer callouts in iOS</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/feature-layer-callouts-in-ios/m-p/365207#M3151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One idea is to look at the feature attributes first and make sure the keys are not in lower case. You can always do [feature allAttributes] once to look at those and the key names. Hope the problem is a simple as that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Al&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 21:17:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/feature-layer-callouts-in-ios/m-p/365207#M3151</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-08-01T21:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Feature layer callouts in iOS</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/feature-layer-callouts-in-ios/m-p/365208#M3152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, it turns out that I was missing setting outFields in the feature leayer:&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayer.&lt;SPAN style="color: #703daa;"&gt;outFields&lt;/SPAN&gt; = [&lt;SPAN style="color: #703daa;"&gt;NSArray&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;arrayWithObject&lt;/SPAN&gt;:&lt;SPAN style="color: #d12f1b;"&gt;@"*"&lt;/SPAN&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I did this, all the fields were accessible as attributes in the graphic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 13:55:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/feature-layer-callouts-in-ios/m-p/365208#M3152</guid>
      <dc:creator>KunalMehta</dc:creator>
      <dc:date>2014-08-04T13:55:25Z</dc:date>
    </item>
  </channel>
</rss>

