<?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: Using Components with hitTest: 'click' on Calcite Buttons registers as hitTest in underlying Map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-components-with-hittest-click-on-calcite/m-p/1650117#M87623</link>
    <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To add, the Custom Event returned by 'arcgisViewClick' is slightly different from the 'click' event -- devs may need to dig into event.detail to access the users screenPoint.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Sep 2025 15:50:32 GMT</pubDate>
    <dc:creator>D_Atkins</dc:creator>
    <dc:date>2025-09-12T15:50:32Z</dc:date>
    <item>
      <title>Using Components with hitTest: 'click' on Calcite Buttons registers as hitTest in underlying Map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-components-with-hittest-click-on-calcite/m-p/1650108#M87621</link>
      <description>&lt;P&gt;Prior to Components, I was able to use mapView.on("click").&amp;nbsp; If a user clicked on the Zoom/Nav buttons, everything works as expected -- the tool works&amp;nbsp;and the mapView.hitTest is ignored.&lt;BR /&gt;&lt;BR /&gt;Migrating to Components, I'm getting '.on' is not a function. But if replace this method with 'addEventListener', then the hitTest is called&amp;nbsp;&lt;EM&gt;even when the user clicks a Calcite tool positioned over the map&lt;/EM&gt;.&lt;BR /&gt;&lt;BR /&gt;There's probably an obvious programming pattern I'm overlooking -- but just in case it is more involved, I've thrown together a CodePen to show the difference I'm seeing (... the code is only printing to Console, for now)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://codepen.io/Dane-Atkins/pen/ZYbdGeo" target="_blank" rel="noopener"&gt;hitTest_noComponent&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://codepen.io/Dane-Atkins/pen/VYvJLWw?editors=1010" target="_blank" rel="noopener"&gt;hitTest_Components&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Is there a different event, or a different method for the event I should be using with Components?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;A way in the hitTest to check if a Calcite tool was clicked?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 15:08:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-components-with-hittest-click-on-calcite/m-p/1650108#M87621</guid>
      <dc:creator>D_Atkins</dc:creator>
      <dc:date>2025-09-12T15:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using Components with hitTest: 'click' on Calcite Buttons registers as hitTest in underlying Map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-components-with-hittest-click-on-calcite/m-p/1650110#M87622</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/848899"&gt;@D_Atkins&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Try using&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-map/#arcgisViewClick" target="_self"&gt;arcgisViewClick&lt;/A&gt;&amp;nbsp;instead on the `click` event.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/sagewall/pen/XJmLbQQ?editors=1000" target="_blank"&gt;https://codepen.io/sagewall/pen/XJmLbQQ?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 15:23:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-components-with-hittest-click-on-calcite/m-p/1650110#M87622</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2025-09-12T15:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Components with hitTest: 'click' on Calcite Buttons registers as hitTest in underlying Map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-components-with-hittest-click-on-calcite/m-p/1650117#M87623</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To add, the Custom Event returned by 'arcgisViewClick' is slightly different from the 'click' event -- devs may need to dig into event.detail to access the users screenPoint.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Sep 2025 15:50:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-components-with-hittest-click-on-calcite/m-p/1650117#M87623</guid>
      <dc:creator>D_Atkins</dc:creator>
      <dc:date>2025-09-12T15:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using Components with hitTest: 'click' on Calcite Buttons registers as hitTest in underlying Map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-components-with-hittest-click-on-calcite/m-p/1676558#M88046</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt;&amp;nbsp; If you have a mapimagelayer, then it will still show "No feature hit" in the console. hittest works for featurelayers. How can you modify the script to show hit featureLayer/no feature hit if you are using a feature layer and a mapimagelayer.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 00:07:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-components-with-hittest-click-on-calcite/m-p/1676558#M88046</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2026-01-08T00:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Components with hitTest: 'click' on Calcite Buttons registers as hitTest in underlying Map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-components-with-hittest-click-on-calcite/m-p/1676769#M88049</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/14521"&gt;@LefterisKoumis&lt;/a&gt;&amp;nbsp;, your right with HitTest isn't supported for server based layers like MapImageLayer.&amp;nbsp; You will need to use &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-identify.html" target="_self"&gt;identify&lt;/A&gt; with MapImageLayer.&amp;nbsp; This is a sample that shows how to use identify.&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/identify/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/identify/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 16:14:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-components-with-hittest-click-on-calcite/m-p/1676769#M88049</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2026-01-08T16:14:29Z</dc:date>
    </item>
  </channel>
</rss>

