<?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: Weird behavior from hit test on mouse move in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/weird-behavior-from-hit-test-on-mouse-move/m-p/468689#M43450</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, you got it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Jul 2019 19:21:36 GMT</pubDate>
    <dc:creator>BrianVan_Nostrand</dc:creator>
    <dc:date>2019-07-30T19:21:36Z</dc:date>
    <item>
      <title>Weird behavior from hit test on mouse move</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/weird-behavior-from-hit-test-on-mouse-move/m-p/468687#M43448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to write an app that will allow&amp;nbsp;users to move through a series of steps to route through a road network using a restricted workflow. Anyway, part of what I'm trying to do is have the user mouse over lines, select one by clicking on it, then expose all of the intersections along that route to allow the user to click an intersection, then choose the next route to continue on and so on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Part of the workflow is to use hit test&amp;nbsp;when the&amp;nbsp;mouse is moved within the view to identify which line segment they are hovering over, then zoom to that line on a click event, exposing its intersections at the same time.&amp;nbsp;So far I've come up with this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/454799_hittest.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;When the click event fires, though, it's showing multiple responses. Specifically, it's showing as many responses as there&amp;nbsp;&lt;STRONG&gt;have been hit tests performed, cumulatively.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance, in the following screenshot, you see from script.js line 104,&amp;nbsp;3&amp;nbsp;instances of the hit test event firing (it prints the number of results contained in the hit test response), then&amp;nbsp;3 click responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/454800_console.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone know why this is happening? Code is attached.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2019 17:01:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/weird-behavior-from-hit-test-on-mouse-move/m-p/468687#M43448</guid>
      <dc:creator>BrianVan_Nostrand</dc:creator>
      <dc:date>2019-07-30T17:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Weird behavior from hit test on mouse move</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/weird-behavior-from-hit-test-on-mouse-move/m-p/468688#M43449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You are seeing that many responses because you are adding that many event watchers on line 105. Each time a hittest finds a graphic you add a view.on("pointer-down". You need to add the pointer-down event only once outside of your hit test result function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2019 17:14:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/weird-behavior-from-hit-test-on-mouse-move/m-p/468688#M43449</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-07-30T17:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Weird behavior from hit test on mouse move</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/weird-behavior-from-hit-test-on-mouse-move/m-p/468689#M43450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, you got it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2019 19:21:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/weird-behavior-from-hit-test-on-mouse-move/m-p/468689#M43450</guid>
      <dc:creator>BrianVan_Nostrand</dc:creator>
      <dc:date>2019-07-30T19:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Weird behavior from hit test on mouse move</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/weird-behavior-from-hit-test-on-mouse-move/m-p/468690#M43451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me know when you're thinking about retiring so I can short ESRI stock.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2019 19:23:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/weird-behavior-from-hit-test-on-mouse-move/m-p/468690#M43451</guid>
      <dc:creator>BrianVan_Nostrand</dc:creator>
      <dc:date>2019-07-30T19:23:13Z</dc:date>
    </item>
  </channel>
</rss>

