<?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: Trigger &amp;quot;onClick&amp;quot; of graphics layer programmatically in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trigger-amp-amp-quot-onclick-amp-amp-quot-of/m-p/701368#M65321</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You don't need to actually fire the click event, you can grab the first graphic from the graphics array, or save it however you want and use that to show the infowindow with the content you have set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var g = map.graphics.graphics[0]; var ctr = g.geometry.getExtent().getCenter(); map.infoWindow.setContent(g.getContent()); map.infoWindow.show(ctr);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a sample.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/odoe/pGmWY/6/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/odoe/pGmWY/6/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's a sample for this too&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/EN/webapi/javascript/arcgis/jssamples/#sample/query_showinfowindow" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/EN/webapi/javascript/arcgis/jssamples/#sample/query_showinfowindow&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Feb 2013 16:06:27 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2013-02-20T16:06:27Z</dc:date>
    <item>
      <title>Trigger &amp;amp;quot;onClick&amp;amp;quot; of graphics layer programmatically</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trigger-amp-amp-quot-onclick-amp-amp-quot-of/m-p/701367#M65320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How do you trigger a graphicslayer's onclick event without clicking?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got an app that adds graphics on the map's graphics layer. I know the default behavior of a clicked graphic is to show the infoWindow with it's infoTemplate. Basically, I want to show the infoTemplate of the first graphic after all the graphics have been added to the map. Is there a way to trigger the "onClick" event on either the map or graphics layer without clicking?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 15:33:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trigger-amp-amp-quot-onclick-amp-amp-quot-of/m-p/701367#M65320</guid>
      <dc:creator>KenDoman</dc:creator>
      <dc:date>2013-02-20T15:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger "onClick" of graphics layer programmatically</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trigger-amp-amp-quot-onclick-amp-amp-quot-of/m-p/701368#M65321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You don't need to actually fire the click event, you can grab the first graphic from the graphics array, or save it however you want and use that to show the infowindow with the content you have set.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var g = map.graphics.graphics[0]; var ctr = g.geometry.getExtent().getCenter(); map.infoWindow.setContent(g.getContent()); map.infoWindow.show(ctr);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a sample.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/odoe/pGmWY/6/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/odoe/pGmWY/6/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's a sample for this too&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/EN/webapi/javascript/arcgis/jssamples/#sample/query_showinfowindow" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/EN/webapi/javascript/arcgis/jssamples/#sample/query_showinfowindow&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 16:06:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/trigger-amp-amp-quot-onclick-amp-amp-quot-of/m-p/701368#M65321</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2013-02-20T16:06:27Z</dc:date>
    </item>
  </channel>
</rss>

