<?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: Displaying Callouts Directly from the Feature Service Layer in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/displaying-callouts-directly-from-the-feature/m-p/323031#M2817</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For those of you who may be interested, I figured it out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First, I adopted these delegates in my interface file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;AGSMapViewLayerDelegate&amp;gt; &amp;lt;AGSMapViewCalloutDelegate&amp;gt; &amp;lt; AGSMapViewTouchDelegate&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, I set the delegates, added the Feature Layer, created a template for the title and detail text in the callout, and assigned the template to the feature layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;// Set the Layer Delegate self.mapView.layerDelegate = self; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the Callout Delegate self.mapView.calloutDelegate = self; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the Touch Delegate self.mapView.touchDelegate = self;&amp;nbsp;&amp;nbsp; //-----------------Create and Add Feature Layer------------------------- &amp;nbsp;&amp;nbsp;&amp;nbsp; NSURL* myUrl = [NSURL URLWithString: @"&amp;lt;place feature service URL here&amp;gt;"];&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; AGSFeatureLayer* myLayer = [AGSFeatureLayer featureServiceLayerWithURL: myUrl mode: AGSFeatureLayerModeOnDemand]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Add My Dynamic Feature Layer to Map View &amp;nbsp;&amp;nbsp;&amp;nbsp; [self.mapView addMapLayer:myLayer withName:@"My Layer"];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Create Info Template Delegate for My Dynamic Feature Layer &amp;nbsp;&amp;nbsp;&amp;nbsp; AGSCalloutTemplate* myTemplate = [[AGSCalloutTemplate alloc] init] ; &amp;nbsp;&amp;nbsp;&amp;nbsp; myTemplate.titleTemplate = @"${Field Value for Title Text}";&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; myTemplate.detailTemplate = @"${Field Value for Detail Text}";&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Assign Template to My Dynamic Feature Layer &amp;nbsp;&amp;nbsp;&amp;nbsp; myLayer.infoTemplateDelegate = myTemplate;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps anyone having a similar issue&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2012 20:02:12 GMT</pubDate>
    <dc:creator>MasonMalcik</dc:creator>
    <dc:date>2012-02-08T20:02:12Z</dc:date>
    <item>
      <title>Displaying Callouts Directly from the Feature Service Layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/displaying-callouts-directly-from-the-feature/m-p/323030#M2816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm a newbie at developing iOS applications with the ArcGIS SDK, and so far, my application has running smoothly, apart from the lack of callouts.&amp;nbsp; I have several dynamic feature service layers that I am using, which are displaying in the map view without any problems. However I cannot find any information on how to display the callouts directly from the feature layers displayed.&amp;nbsp; Is there a way to do this?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Every tutorial and reference guide I see seems to suggest I have to create a separate graphics layer for the features first, then run a task in order to get information for the callout.&amp;nbsp; I would much appreciate a way of getting around this, if that is even possible.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 17:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/displaying-callouts-directly-from-the-feature/m-p/323030#M2816</guid>
      <dc:creator>MasonMalcik</dc:creator>
      <dc:date>2012-01-30T17:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Callouts Directly from the Feature Service Layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/displaying-callouts-directly-from-the-feature/m-p/323031#M2817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For those of you who may be interested, I figured it out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First, I adopted these delegates in my interface file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;AGSMapViewLayerDelegate&amp;gt; &amp;lt;AGSMapViewCalloutDelegate&amp;gt; &amp;lt; AGSMapViewTouchDelegate&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, I set the delegates, added the Feature Layer, created a template for the title and detail text in the callout, and assigned the template to the feature layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;// Set the Layer Delegate self.mapView.layerDelegate = self; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the Callout Delegate self.mapView.calloutDelegate = self; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the Touch Delegate self.mapView.touchDelegate = self;&amp;nbsp;&amp;nbsp; //-----------------Create and Add Feature Layer------------------------- &amp;nbsp;&amp;nbsp;&amp;nbsp; NSURL* myUrl = [NSURL URLWithString: @"&amp;lt;place feature service URL here&amp;gt;"];&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; AGSFeatureLayer* myLayer = [AGSFeatureLayer featureServiceLayerWithURL: myUrl mode: AGSFeatureLayerModeOnDemand]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Add My Dynamic Feature Layer to Map View &amp;nbsp;&amp;nbsp;&amp;nbsp; [self.mapView addMapLayer:myLayer withName:@"My Layer"];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Create Info Template Delegate for My Dynamic Feature Layer &amp;nbsp;&amp;nbsp;&amp;nbsp; AGSCalloutTemplate* myTemplate = [[AGSCalloutTemplate alloc] init] ; &amp;nbsp;&amp;nbsp;&amp;nbsp; myTemplate.titleTemplate = @"${Field Value for Title Text}";&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; myTemplate.detailTemplate = @"${Field Value for Detail Text}";&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Assign Template to My Dynamic Feature Layer &amp;nbsp;&amp;nbsp;&amp;nbsp; myLayer.infoTemplateDelegate = myTemplate;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps anyone having a similar issue&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 20:02:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/displaying-callouts-directly-from-the-feature/m-p/323031#M2817</guid>
      <dc:creator>MasonMalcik</dc:creator>
      <dc:date>2012-02-08T20:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Callouts Directly from the Feature Service Layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/displaying-callouts-directly-from-the-feature/m-p/323032#M2818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In addition to those steps, it is crucial to add this line of code when you create the feature layer, in order to get all the outfields available:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;self.myfeatureLayer.outFields = [NSArray arrayWithObject:@"*"];&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 12:34:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/displaying-callouts-directly-from-the-feature/m-p/323032#M2818</guid>
      <dc:creator>MasonMalcik</dc:creator>
      <dc:date>2012-02-23T12:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Callouts Directly from the Feature Service Layer</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/displaying-callouts-directly-from-the-feature/m-p/323033#M2819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In addition to those steps, it is crucial to add this line of code when you create the feature layer, in order to get all the outfields available:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;self.myfeatureLayer.outFields = [NSArray arrayWithObject:@"*"];&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Mason,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's probably also worth noting that you should consider this in the context of the data you're pulling down and the requirements of your popup. While this is certainly the easiest way to make sure you have everything at your fingertips, for data sources with many fields and/or sources that might have fields with large amounts of data in them, consider only listing the fields you want to make use of (especially if running over 3G).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 17:34:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/displaying-callouts-directly-from-the-feature/m-p/323033#M2819</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2012-02-29T17:34:57Z</dc:date>
    </item>
  </channel>
</rss>

