<?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: undocumented hit testing behavior on 10.2 in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/undocumented-hit-testing-behavior-on-10-2/m-p/645125#M5745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dana,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for providing reproducible case. The problem is, you are creating graphic with envelope. If you create, graphic with polygon everything will work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSMutableDictionary *atts = [[NSMutableDictionary alloc] init];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSSimpleFillSymbol *symbol = [self fillSymbolForOpacity:_currentFillOpacity];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //AGSEnvelope *testPoly = [[AGSEnvelope alloc] initWithXmin:-13701208.361324 ymin:5471547.949196 xmax:-13699472.062330 ymax:5473284.248190 spatialReference:_mapView.spatialReference];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSMutablePolygon *polygon = [[AGSMutablePolygon alloc] initWithSpatialReference:_mapView.spatialReference];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygon addRingToPolygon];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygon addPointToRing:[AGSPoint pointWithX:-13701208.361324 y:5471547.949196 spatialReference:nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygon addPointToRing:[AGSPoint pointWithX:-13701208.361324 y:5473284.248190 spatialReference:nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygon addPointToRing:[AGSPoint pointWithX:-13699472.062330 y:5473284.248190 spatialReference:nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygon addPointToRing:[AGSPoint pointWithX:-13699472.062330 y:5471547.949196 spatialReference:nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _testGraphic = [[AGSGraphic alloc] initWithGeometry:polygon symbol:symbol attributes:atts];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [_gLayer addGraphic:_testGraphic];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We'll see if if we can fix the hit test issue with envelope geometry.&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>Thu, 09 Jan 2014 16:09:56 GMT</pubDate>
    <dc:creator>NimeshJarecha</dc:creator>
    <dc:date>2014-01-09T16:09:56Z</dc:date>
    <item>
      <title>undocumented hit testing behavior on 10.2</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/undocumented-hit-testing-behavior-on-10-2/m-p/645124#M5744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As requested in &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/95789-10.2-is-here!"&gt;the 10.2 sticky thread&lt;/A&gt;&lt;SPAN&gt;, I am posting a test harness (see attached .zip) that shows undocumented hit testing behavior changes in 10.2. The test harness creates a basic map with one &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSTiledMapServiceLayer&lt;/SPAN&gt;&lt;SPAN&gt; and one &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSGraphicsLayer&lt;/SPAN&gt;&lt;SPAN&gt;. The &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;AGSGraphicsLayer&lt;/SPAN&gt;&lt;SPAN&gt; contains a single rectangular test graphic that is initially symbolized/filled with the default system color &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;[UIColor redColor]&lt;/SPAN&gt;&lt;SPAN&gt; and an alpha value of 1.0. A segmented control is provided that will toggle the alpha value to several values falling between 1.0 and 0.0, and some simple hit testing feedback is provided via on-screen labels, the presentation of a callout, and &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;NSLog&lt;/SPAN&gt;&lt;SPAN&gt; statements.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In using this test harness with 10.2, I see the following behavior:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Case of alpha = 1.0 OR 0.01 : Hits detected on perimeter and interior of test graphic.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Case of alpha = 0.0001 OR 0.0 : Hits detected on perimeter but not on interior of test graphic.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;So, it appears that at some value approaching 0.0, the SDK decides that the alpha is effectively 0.0 and also starts passing hits through without assigning them to the graphic. Also, even at very low alpha values that still intercept touches, the fill is very slightly visible. I would like to be able to use a truly transparent fill (and outline, actually) and still catch interior taps. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Prior to 10.2, invisible areas of graphics caught hits and tehcnobrat's comment from the 10.2 sticky thread indicates this is unexpected behavior: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;[INDENT]"We haven't changed the hit-testing mechanism to ignore transparent fills. I am unable to reproduce the behavior you described.&lt;BR /&gt;Could you please start a new thread and provide some code to repro?"[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ideally, it seems like developers should be able to set a flag causing hit testing to either use or ignore the alpha value. On the project that led me to report this behavior, I would really like "invisible" graphics to still catch touches because they are sitting over a tiled map service that gives the user a really good idea of where they would like to tap and looks a lot better than a collection of visible graphics. However, I can see myself wanting the opposite behavior for a different use case involving city boundaries or the like. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, and apologies for the belated response; I've been swamped at work and am trying to maintain some semblance of work-life balance &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 22:17:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/undocumented-hit-testing-behavior-on-10-2/m-p/645124#M5744</guid>
      <dc:creator>DanaMaher</dc:creator>
      <dc:date>2013-12-13T22:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: undocumented hit testing behavior on 10.2</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/undocumented-hit-testing-behavior-on-10-2/m-p/645125#M5745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dana,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for providing reproducible case. The problem is, you are creating graphic with envelope. If you create, graphic with polygon everything will work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSMutableDictionary *atts = [[NSMutableDictionary alloc] init];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSSimpleFillSymbol *symbol = [self fillSymbolForOpacity:_currentFillOpacity];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //AGSEnvelope *testPoly = [[AGSEnvelope alloc] initWithXmin:-13701208.361324 ymin:5471547.949196 xmax:-13699472.062330 ymax:5473284.248190 spatialReference:_mapView.spatialReference];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSMutablePolygon *polygon = [[AGSMutablePolygon alloc] initWithSpatialReference:_mapView.spatialReference];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygon addRingToPolygon];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygon addPointToRing:[AGSPoint pointWithX:-13701208.361324 y:5471547.949196 spatialReference:nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygon addPointToRing:[AGSPoint pointWithX:-13701208.361324 y:5473284.248190 spatialReference:nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygon addPointToRing:[AGSPoint pointWithX:-13699472.062330 y:5473284.248190 spatialReference:nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [polygon addPointToRing:[AGSPoint pointWithX:-13699472.062330 y:5471547.949196 spatialReference:nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _testGraphic = [[AGSGraphic alloc] initWithGeometry:polygon symbol:symbol attributes:atts];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [_gLayer addGraphic:_testGraphic];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We'll see if if we can fix the hit test issue with envelope geometry.&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>Thu, 09 Jan 2014 16:09:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/undocumented-hit-testing-behavior-on-10-2/m-p/645125#M5745</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2014-01-09T16:09:56Z</dc:date>
    </item>
  </channel>
</rss>

