<?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 GraphicsLayer onClick event in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphicslayer-onclick-event/m-p/386104#M35661</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having a hard time capturing the 'onClick' event of a GraphicsLayer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am capturing the 'onMouseOver' and 'onMouseOut' events for this layer as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dojo.connect( queryGraphicsLayer, "onMouseOver", queryLayer.showToolTip ); dojo.connect( queryGraphicsLayer, "onMouseOut", queryLayer.hideToolTip );&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With this, I am able to swap in/out a highlight symbol as the mouse moves over the graphics.&amp;nbsp; All good here.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also need to capture the 'onClick' event, so I can go do some other work when the user clicks on the graphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried all of the following approaches with no success.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dojo.connect( map.graphics, "onClick", queryLayer.graphics_OnClickHandler );&amp;nbsp; dojo.connect( queryGraphicsLayer, "onClick", queryLayer.graphics_OnClickHandler );&amp;nbsp; dojo.connect( graphic, "onClick", queryLayer.graphics_OnClickHandler ); queryGraphicsLayer.add( graphic );&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why is the 'onClick' event being so elusive?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Suggestions appreciated.&amp;nbsp; Thank you much.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Nov 2012 18:39:46 GMT</pubDate>
    <dc:creator>GregKnight</dc:creator>
    <dc:date>2012-11-20T18:39:46Z</dc:date>
    <item>
      <title>GraphicsLayer onClick event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphicslayer-onclick-event/m-p/386104#M35661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having a hard time capturing the 'onClick' event of a GraphicsLayer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am capturing the 'onMouseOver' and 'onMouseOut' events for this layer as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dojo.connect( queryGraphicsLayer, "onMouseOver", queryLayer.showToolTip ); dojo.connect( queryGraphicsLayer, "onMouseOut", queryLayer.hideToolTip );&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With this, I am able to swap in/out a highlight symbol as the mouse moves over the graphics.&amp;nbsp; All good here.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also need to capture the 'onClick' event, so I can go do some other work when the user clicks on the graphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried all of the following approaches with no success.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dojo.connect( map.graphics, "onClick", queryLayer.graphics_OnClickHandler );&amp;nbsp; dojo.connect( queryGraphicsLayer, "onClick", queryLayer.graphics_OnClickHandler );&amp;nbsp; dojo.connect( graphic, "onClick", queryLayer.graphics_OnClickHandler ); queryGraphicsLayer.add( graphic );&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why is the 'onClick' event being so elusive?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Suggestions appreciated.&amp;nbsp; Thank you much.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 18:39:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphicslayer-onclick-event/m-p/386104#M35661</guid>
      <dc:creator>GregKnight</dc:creator>
      <dc:date>2012-11-20T18:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: GraphicsLayer onClick event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphicslayer-onclick-event/m-p/386105#M35662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have a read of this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/66323-MouseOver-and-Click-Not-working-together?p=230413&amp;amp;viewfull=1#post230413" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/66323-MouseOver-and-Click-Not-working-together?p=230413&amp;amp;viewfull=1#post230413&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 07:43:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphicslayer-onclick-event/m-p/386105#M35662</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-11-21T07:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: GraphicsLayer onClick event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphicslayer-onclick-event/m-p/386106#M35663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I understand what is happening now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Nov 2012 13:01:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphicslayer-onclick-event/m-p/386106#M35663</guid>
      <dc:creator>GregKnight</dc:creator>
      <dc:date>2012-11-26T13:01:09Z</dc:date>
    </item>
  </channel>
</rss>

