<?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: HitTest not returning results for polygons with transparent fill in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1461384#M84577</link>
    <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I was wrong to say that it is a bug at 4.29. It turns out that if the style is none, the JS API assumes&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;there is no fill and so nothing is returned in the hit test unless the user clicks the outline. The correct behavior is to update your code by setting a transparent fill if you want a hit returned.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Sorry about the confusion.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2024 22:30:04 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2024-05-13T22:30:04Z</dc:date>
    <item>
      <title>HitTest not returning results for polygons with transparent fill</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1435919#M84555</link>
      <description>&lt;P&gt;It looks like MapView.hitTest() is not returning any results for polygon features with fully transparent fill. This screenshot shows click locations and hitTest results filtered on layer title (filter should be fine) for two polygons in the same layer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tp_fill.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/103834iA21AF5E861F9B97A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tp_fill.png" alt="tp_fill.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It looks like there was a &lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-hittest-doesn-t-return-results-if-opacity/td-p/514923" target="_blank" rel="noopener"&gt;similar issue around 4.5&lt;/A&gt; with polygon fills of any transparency, but apparently the fix did not cover fully transparent polygons. If there's not something wrong with my setup, then transparent fill polygons essentially act like polylines for the purpose of hitTesting.&lt;/P&gt;&lt;P&gt;&amp;gt; Running 4.29&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 01:08:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1435919#M84555</guid>
      <dc:creator>DSmith_InnovateInc</dc:creator>
      <dc:date>2024-05-11T01:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: HitTest not returning results for polygons with transparent fill</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1436608#M84556</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am not able to reproduce the behavior you describe. Here is a codepen showing hitTest returning results with no fill -&amp;nbsp;&lt;A href="https://codepen.io/U_B_U/pen/YzbPKrO?editors=100" target="_blank"&gt;https://codepen.io/U_B_U/pen/YzbPKrO?editors=100&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 03:02:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1436608#M84556</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2024-05-11T03:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: HitTest not returning results for polygons with transparent fill</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1459510#M84567</link>
      <description>&lt;P&gt;The behavior does occur if you set the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleFillSymbol.html#style" target="_self"&gt;style&lt;/A&gt; property to "none"...perhaps that's what's going on.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 17:38:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1459510#M84567</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-05-13T17:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: HitTest not returning results for polygons with transparent fill</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1460788#M84574</link>
      <description>&lt;P&gt;Ah! I am able to reproduce the issue. I will update you once we fix the issue. Thank you for reporting this issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 20:55:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1460788#M84574</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2024-05-13T20:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: HitTest not returning results for polygons with transparent fill</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1461384#M84577</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I was wrong to say that it is a bug at 4.29. It turns out that if the style is none, the JS API assumes&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;there is no fill and so nothing is returned in the hit test unless the user clicks the outline. The correct behavior is to update your code by setting a transparent fill if you want a hit returned.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Sorry about the confusion.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 22:30:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1461384#M84577</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2024-05-13T22:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: HitTest not returning results for polygons with transparent fill</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1462366#M84581</link>
      <description>&lt;P&gt;Thanks Undral and Joel. Okay, I can see some instances where you want to make only the outline of a polygon clickable for a hit test by giving it style: "none". It appears hitTest also doesn't provide results for CIMPolygonSymbols with only a CIMSolidStroke defined. I don't know how symbols on my webmap ended up with vector fill polygons with no fill defined, but they did.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-05-13 175613.png" style="width: 802px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104009iFE35B417CCA8DCF9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-05-13 175613.png" alt="Screenshot 2024-05-13 175613.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;A follow up question would be whether the Map Viewer UI should have the option to add fill symbology if none are initially defined. I had to restart with a new Vector polygon before I would see an option to change the fill properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Template symbols as I found them in MapViewer" style="width: 324px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104006iED3CF8695BE0466A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NoFillOptions.png" alt="Template symbols as I found them in MapViewer" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Template symbols as I found them in MapViewer&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Restarting the template symbol --&amp;gt; polygon fill" style="width: 249px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104007iC88364844CAECCC7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChangeUniqueLayerSymbology.png" alt="Restarting the template symbol --&amp;gt; polygon fill" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Restarting the template symbol --&amp;gt; polygon fill&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Template symbol with fill options after restarting." style="width: 193px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104008i9DA4DAA095970DAC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AfterEditingNewSymbology.png" alt="Template symbol with fill options after restarting." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Template symbol with fill options after restarting.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 01:07:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hittest-not-returning-results-for-polygons-with/m-p/1462366#M84581</guid>
      <dc:creator>DSmith_InnovateInc</dc:creator>
      <dc:date>2024-05-14T01:07:52Z</dc:date>
    </item>
  </channel>
</rss>

