<?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 How to disable FeatureLayer callout function in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-disable-featurelayer-callout-function/m-p/559329#M4794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am adding callout to my Map and it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create a pushpin:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;AGSPictureMarkerSymbol&lt;SPAN style="color: #000000;"&gt; *pushpin = [&lt;/SPAN&gt;AGSPictureMarkerSymbol&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3d1d81;"&gt;pictureMarkerSymbolWithImageNamed&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #d12f1b;"&gt;@"BluePushpin.png"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;];&lt;/SPAN&gt;
pushpin.&lt;SPAN style="color: #703daa;"&gt;offset&lt;/SPAN&gt; = &lt;SPAN style="color: #3d1d81;"&gt;CGPointMake&lt;/SPAN&gt;(&lt;SPAN style="color: #272ad8;"&gt;9&lt;/SPAN&gt;, &lt;SPAN style="color: #272ad8;"&gt;16&lt;/SPAN&gt;);
pushpin.&lt;SPAN style="color: #703daa;"&gt;leaderPoint&lt;/SPAN&gt; = &lt;SPAN style="color: #3d1d81;"&gt;CGPointMake&lt;/SPAN&gt;(-&lt;SPAN style="color: #272ad8;"&gt;9&lt;/SPAN&gt;, &lt;SPAN style="color: #272ad8;"&gt;11&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I add the callout pushpin to may callout layer&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #703daa;"&gt;AGSPoint&lt;/SPAN&gt; *theTask = [&lt;SPAN style="color: #703daa;"&gt;AGSPoint&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;pointWithX&lt;/SPAN&gt;:l&lt;SPAN style="color: #d12f1b;"&gt;atitude &lt;/SPAN&gt;&lt;SPAN style="color: #3d1d81;"&gt;y&lt;/SPAN&gt;:l&lt;SPAN style="color: #d12f1b;"&gt;ongitude&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;doubleValue&lt;/SPAN&gt;]
&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d1d81;"&gt;spatialReference&lt;/SPAN&gt;:&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;.&lt;SPAN style="color: #4f8187;"&gt;mapView&lt;/SPAN&gt;.&lt;SPAN style="color: #703daa;"&gt;spatialReference&lt;/SPAN&gt;];
&lt;SPAN style="color: #703daa; font-family: Menlo; font-size: 11px;"&gt;AGSGraphic&lt;/SPAN&gt; graphic = [&lt;SPAN style="color: #703daa;"&gt;AGSGraphic&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;graphicWithGeometry&lt;/SPAN&gt;:theTask &lt;SPAN style="color: #3d1d81;"&gt;symbol&lt;/SPAN&gt;:pushpin &lt;SPAN style="color: #3d1d81;"&gt;attributes&lt;/SPAN&gt;:singleDataDic];
[&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;.&lt;SPAN style="color: #4f8187;"&gt;taskInfoLayer&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;addGraphic&lt;/SPAN&gt;:graphic];&lt;/PRE&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;&lt;/P&gt;&lt;P&gt;Everything works fine, when I tap on a pin point, it actually shows something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem happened after I added some other layer:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #703daa;"&gt;NSURL&lt;/SPAN&gt; *featureBldgURL = [&lt;SPAN style="color: #703daa;"&gt;NSURL&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;URLWithString&lt;/SPAN&gt;:&lt;SPAN style="color: #78492a;"&gt;LAYER_BLDG_URL&lt;/SPAN&gt;];
&lt;SPAN style="color: #703daa;"&gt;AGSFeatureLayer&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; *bldgLayer = [&lt;/SPAN&gt;&lt;SPAN style="color: #703daa;"&gt;AGSFeatureLayer&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;featureServiceLayerWithURL&lt;SPAN style="color: #000000;"&gt;:featureBldgURL &lt;/SPAN&gt;mode&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;AGSFeatureLayerModeOnDemand&lt;SPAN style="color: #000000;"&gt;];&lt;/SPAN&gt;
[&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;.&lt;SPAN style="color: #4f8187;"&gt;mapView&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;addMapLayer&lt;/SPAN&gt;:bldgLayer &lt;SPAN style="color: #3d1d81;"&gt;withName&lt;/SPAN&gt;:&lt;SPAN style="color: #78492a;"&gt;LAYER_BLDG_NAME&lt;/SPAN&gt;];&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even when I tap on a place where I did not put a pushpin, it still shows up an empty callout dialog:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="tmp.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/90805_tmp.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found that the AGSFeatureLayer has implement AGSLayerCalloutDelegate, maybe it's the reason to show an empty callout when user tap on that AGSFeatureLayer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I disable the callout for AGSFeatureLayer? Or, any other solution for this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:08:13 GMT</pubDate>
    <dc:creator>QKunZhu</dc:creator>
    <dc:date>2021-12-12T00:08:13Z</dc:date>
    <item>
      <title>How to disable FeatureLayer callout function</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-disable-featurelayer-callout-function/m-p/559329#M4794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am adding callout to my Map and it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create a pushpin:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;AGSPictureMarkerSymbol&lt;SPAN style="color: #000000;"&gt; *pushpin = [&lt;/SPAN&gt;AGSPictureMarkerSymbol&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #3d1d81;"&gt;pictureMarkerSymbolWithImageNamed&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #d12f1b;"&gt;@"BluePushpin.png"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;];&lt;/SPAN&gt;
pushpin.&lt;SPAN style="color: #703daa;"&gt;offset&lt;/SPAN&gt; = &lt;SPAN style="color: #3d1d81;"&gt;CGPointMake&lt;/SPAN&gt;(&lt;SPAN style="color: #272ad8;"&gt;9&lt;/SPAN&gt;, &lt;SPAN style="color: #272ad8;"&gt;16&lt;/SPAN&gt;);
pushpin.&lt;SPAN style="color: #703daa;"&gt;leaderPoint&lt;/SPAN&gt; = &lt;SPAN style="color: #3d1d81;"&gt;CGPointMake&lt;/SPAN&gt;(-&lt;SPAN style="color: #272ad8;"&gt;9&lt;/SPAN&gt;, &lt;SPAN style="color: #272ad8;"&gt;11&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I add the callout pushpin to may callout layer&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #703daa;"&gt;AGSPoint&lt;/SPAN&gt; *theTask = [&lt;SPAN style="color: #703daa;"&gt;AGSPoint&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;pointWithX&lt;/SPAN&gt;:l&lt;SPAN style="color: #d12f1b;"&gt;atitude &lt;/SPAN&gt;&lt;SPAN style="color: #3d1d81;"&gt;y&lt;/SPAN&gt;:l&lt;SPAN style="color: #d12f1b;"&gt;ongitude&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;doubleValue&lt;/SPAN&gt;]
&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d1d81;"&gt;spatialReference&lt;/SPAN&gt;:&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;.&lt;SPAN style="color: #4f8187;"&gt;mapView&lt;/SPAN&gt;.&lt;SPAN style="color: #703daa;"&gt;spatialReference&lt;/SPAN&gt;];
&lt;SPAN style="color: #703daa; font-family: Menlo; font-size: 11px;"&gt;AGSGraphic&lt;/SPAN&gt; graphic = [&lt;SPAN style="color: #703daa;"&gt;AGSGraphic&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;graphicWithGeometry&lt;/SPAN&gt;:theTask &lt;SPAN style="color: #3d1d81;"&gt;symbol&lt;/SPAN&gt;:pushpin &lt;SPAN style="color: #3d1d81;"&gt;attributes&lt;/SPAN&gt;:singleDataDic];
[&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;.&lt;SPAN style="color: #4f8187;"&gt;taskInfoLayer&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;addGraphic&lt;/SPAN&gt;:graphic];&lt;/PRE&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Menlo;"&gt;&lt;/P&gt;&lt;P&gt;Everything works fine, when I tap on a pin point, it actually shows something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem happened after I added some other layer:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #703daa;"&gt;NSURL&lt;/SPAN&gt; *featureBldgURL = [&lt;SPAN style="color: #703daa;"&gt;NSURL&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;URLWithString&lt;/SPAN&gt;:&lt;SPAN style="color: #78492a;"&gt;LAYER_BLDG_URL&lt;/SPAN&gt;];
&lt;SPAN style="color: #703daa;"&gt;AGSFeatureLayer&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; *bldgLayer = [&lt;/SPAN&gt;&lt;SPAN style="color: #703daa;"&gt;AGSFeatureLayer&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;featureServiceLayerWithURL&lt;SPAN style="color: #000000;"&gt;:featureBldgURL &lt;/SPAN&gt;mode&lt;SPAN style="color: #000000;"&gt;:&lt;/SPAN&gt;AGSFeatureLayerModeOnDemand&lt;SPAN style="color: #000000;"&gt;];&lt;/SPAN&gt;
[&lt;SPAN style="color: #bb2ca2;"&gt;self&lt;/SPAN&gt;.&lt;SPAN style="color: #4f8187;"&gt;mapView&lt;/SPAN&gt; &lt;SPAN style="color: #3d1d81;"&gt;addMapLayer&lt;/SPAN&gt;:bldgLayer &lt;SPAN style="color: #3d1d81;"&gt;withName&lt;/SPAN&gt;:&lt;SPAN style="color: #78492a;"&gt;LAYER_BLDG_NAME&lt;/SPAN&gt;];&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even when I tap on a place where I did not put a pushpin, it still shows up an empty callout dialog:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="tmp.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/90805_tmp.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found that the AGSFeatureLayer has implement AGSLayerCalloutDelegate, maybe it's the reason to show an empty callout when user tap on that AGSFeatureLayer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I disable the callout for AGSFeatureLayer? Or, any other solution for this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:08:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-disable-featurelayer-callout-function/m-p/559329#M4794</guid>
      <dc:creator>QKunZhu</dc:creator>
      <dc:date>2021-12-12T00:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable FeatureLayer callout function</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-disable-featurelayer-callout-function/m-p/559330#M4795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/138945"&gt;QKun Zhu&lt;/A&gt;​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can customize the behavior of the callout using the calloutDelegate (&lt;A class="el" href="https://developers.arcgis.com/ios/api-reference/_a_g_s_layer_callout_delegate_8h.html" style="color: #7a7782; font-weight: bold; font-family: Roboto, sans-serif;"&gt;AGSLayerCalloutDelegate).&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign the calloutDelegate on the blgLayer as the view controller. And in the same view controller implement the following delegate method. If you return NO or false, the callout won't be shown. So you can use this method to show the callout selectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="memberdecls" style="font-family: Roboto, sans-serif; color: #000000;"&gt;&lt;TBODY&gt;&lt;TR class="memitem:ab6569694e38f27cbc7a6e1926b36e43f"&gt;&lt;TD align="right" class="memItemLeft" style="background-color: #fbfbfb; border: none; margin: 4px; padding: 1px 0 0 8px;" valign="top"&gt;(BOOL) &lt;/TD&gt;&lt;TD class="memItemRight" style="background-color: #fbfbfb; border: none; margin: 4px; padding: 1px 0 0 8px;" valign="bottom"&gt;- &lt;A class="el" href="https://developers.arcgis.com/ios/api-reference/protocol_a_g_s_layer_callout_delegate-p.html#ab6569694e38f27cbc7a6e1926b36e43f" style="color: #7a7782; font-weight: bold;"&gt;callout:willShowForFeature:layer:mapPoint:&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="color: #000000; font-family: Roboto, sans-serif;"&gt;This method is called when a user taps on some features in a layer. Delegates should implement this method when they want to configure how a callout looks for a particular feature in a particular layer. Some properties delegates may want to configure are title, detail, image, customView, etc. The delegate should return YES for the callout to be shown. The delegate can return NO for those features for which a callout should not be shown. If this method is not implemented, &lt;/SPAN&gt;&lt;CODE style="color: #000000;"&gt;&lt;A class="el" href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_callout.html#a5c66c45a61fb1076a43430991f2a38f5" style="color: #7a7782; font-weight: bold;"&gt;AGSCallout::delegate&lt;/A&gt;&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: Roboto, sans-serif;"&gt; will be consulted instead."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Roboto, sans-serif;"&gt;I hope this helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Roboto, sans-serif;"&gt;Gagan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 16:41:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-disable-featurelayer-callout-function/m-p/559330#M4795</guid>
      <dc:creator>GagandeepSingh</dc:creator>
      <dc:date>2015-04-27T16:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to disable FeatureLayer callout function</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-disable-featurelayer-callout-function/m-p/559331#M4796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gagandeep Singh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem was I implement AGSCalloutDelegate, and this protocol and AGSLayerCalloutDelegate has the same method:&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14301839638236967 jive_text_macro" data-renderedposition="113_8_912_32" jivemacro_uid="_14301839638236967"&gt;&lt;P&gt;- (&lt;SPAN style="color: #bb2ca2;"&gt;BOOL&lt;/SPAN&gt;)callout:(&lt;SPAN style="color: #703daa;"&gt;AGSCallout&lt;/SPAN&gt; *)callout willShowForFeature:(&lt;SPAN style="color: #bb2ca2;"&gt;id&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="color: #703daa;"&gt;AGSFeature&lt;/SPAN&gt;&amp;gt;)feature layer:(&lt;SPAN style="color: #703daa;"&gt;AGSLayer&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="color: #703daa;"&gt;AGSHitTestable&lt;/SPAN&gt;&amp;gt; *)layer mapPoint:(&lt;SPAN style="color: #703daa;"&gt;AGSPoint&lt;/SPAN&gt; *)mapPoint;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my implementation, I made it aways return YES, which is the cause of my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I fixed it by checking the layer type and return NO if user tap on other layer, and it works fine now. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 01:19:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-disable-featurelayer-callout-function/m-p/559331#M4796</guid>
      <dc:creator>QKunZhu</dc:creator>
      <dc:date>2015-04-28T01:19:35Z</dc:date>
    </item>
  </channel>
</rss>

