<?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: Show featureset when clicking on several custom graphics in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747222#M69134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you hzhu, I will have a go at this. It's the sort of thing I was thinking of trying following the lead of this sample which selects multiple objects in the graphics layer: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/demos/graphics/graphics_extent_query.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/demos/graphics/graphics_extent_query.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Feb 2011 08:43:22 GMT</pubDate>
    <dc:creator>JamesBurton</dc:creator>
    <dc:date>2011-02-23T08:43:22Z</dc:date>
    <item>
      <title>Show featureset when clicking on several custom graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747220#M69132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have the following code that loops through some JSON and draws points as graphics with infotemplates. Right now the default behavior is in effect, and clicking on a point shows the infowindow. I want to set this up so that if someone clicks on more than one point I use a different template, showing the list of links to features clicked on. The samples contain examples of this behaviour when using querytasks, but I'm not sure how to adapt that to my situation. Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;/* draw a set of sightings as points on the map */
&amp;nbsp;&amp;nbsp;&amp;nbsp; function drawSightings(data) {
 map.graphics.clear();
 var point, colour, sighting;
 //draw the points
 for (var i=0; i &amp;lt; data.length; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sighting = data&lt;I&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point = {"geometry":{"x": sighting.x,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "y": sighting.y,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "spatialReference": map.spatialReference},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "attributes":{
&amp;nbsp;&amp;nbsp;&amp;nbsp; "number_observed": sighting.number_observed
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "symbol":{
&amp;nbsp;&amp;nbsp;&amp;nbsp; "color": [255, 0, 0, 128],
&amp;nbsp;&amp;nbsp;&amp;nbsp; "size":12,
&amp;nbsp;&amp;nbsp;&amp;nbsp; "angle":0,
&amp;nbsp;&amp;nbsp;&amp;nbsp; "xoffset":0,
&amp;nbsp;&amp;nbsp;&amp;nbsp; "yoffset":0,
&amp;nbsp;&amp;nbsp;&amp;nbsp; "type":"esriSMS",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "style":"esriSMSCircle",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "outline":{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "color":[0,0,0,255],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "width":1,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type":"esriSLS",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "style":"esriSLSSolid"
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "infoTemplate":{
&amp;nbsp;&amp;nbsp;&amp;nbsp; "title": " ${common_name} [${scientific_name}]",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "content": "Number seen: ${number_observed}"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic = new esri.Graphic(point);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(graphic);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 13:37:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747220#M69132</guid>
      <dc:creator>JamesBurton</dc:creator>
      <dc:date>2011-02-18T13:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Show featureset when clicking on several custom graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747221#M69133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have the following code that loops through some JSON and draws points as graphics with infotemplates. Right now the default behavior is in effect, and clicking on a point shows the infowindow. I want to set this up so that if someone clicks on more than one point I use a different template, showing the list of links to features clicked on. The samples contain examples of this behaviour when using querytasks, but I'm not sure how to adapt that to my situation. Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;/* draw a set of sightings as points on the map */
&amp;nbsp;&amp;nbsp;&amp;nbsp; function drawSightings(data) {
 map.graphics.clear();
 var point, colour, sighting;
 //draw the points
 for (var i=0; i &amp;lt; data.length; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sighting = data&lt;I&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point = {"geometry":{"x": sighting.x,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "y": sighting.y,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "spatialReference": map.spatialReference},
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "attributes":{
&amp;nbsp;&amp;nbsp;&amp;nbsp; "number_observed": sighting.number_observed
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "symbol":{
&amp;nbsp;&amp;nbsp;&amp;nbsp; "color": [255, 0, 0, 128],
&amp;nbsp;&amp;nbsp;&amp;nbsp; "size":12,
&amp;nbsp;&amp;nbsp;&amp;nbsp; "angle":0,
&amp;nbsp;&amp;nbsp;&amp;nbsp; "xoffset":0,
&amp;nbsp;&amp;nbsp;&amp;nbsp; "yoffset":0,
&amp;nbsp;&amp;nbsp;&amp;nbsp; "type":"esriSMS",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "style":"esriSMSCircle",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "outline":{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "color":[0,0,0,255],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "width":1,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type":"esriSLS",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "style":"esriSLSSolid"
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "infoTemplate":{
&amp;nbsp;&amp;nbsp;&amp;nbsp; "title": " ${common_name} [${scientific_name}]",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "content": "Number seen: ${number_observed}"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic = new esri.Graphic(point);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(graphic);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/I&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is an idea: add a onclick event on map after you add custom graphics like: dojo.connect (map, "onclick", afterClick). In afterClick(evt) handler, buffer click point to a offset distance you defined (in order to creat a polyon instead of clickpoint itself). using this buffered clickpoint(thePolygon) to do a intersection analysis against the custom graphics like gsvc.intersect(esri.getGeometries(map.graphics.graphics), thePolygon.geometry, identifyCustomGraphics). In identifyCustomGraphics(geometries) handler, get the count of the geometries, if is more than one (meaning that your clicked and buffered point intersected with more than one custom graphics), then add the click point to the graphic layer with a template you specified. This could be a workaround for your situation. However it is little complicated and you have to consider the custom graphics info template's own click event are on etc...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:46:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747221#M69133</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2021-12-12T07:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Show featureset when clicking on several custom graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747222#M69134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you hzhu, I will have a go at this. It's the sort of thing I was thinking of trying following the lead of this sample which selects multiple objects in the graphics layer: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/demos/graphics/graphics_extent_query.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/demos/graphics/graphics_extent_query.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 08:43:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747222#M69134</guid>
      <dc:creator>JamesBurton</dc:creator>
      <dc:date>2011-02-23T08:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Show featureset when clicking on several custom graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747223#M69135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have made some progress with this but I don't know how to diable the custom graphics onclick handlers. Here is the onClick handler I added to map:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function afterClick(evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('afterclick');
&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(evt.mapPoint);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var p = evt.mapPoint;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var green = new esri.symbol.SimpleMarkerSymbol().setColor(
 new dojo.Color([0, 255, 0]));
&amp;nbsp;&amp;nbsp;&amp;nbsp; var red = new esri.symbol.SimpleMarkerSymbol().setColor(
 new dojo.Color([255, 0, 0]));
&amp;nbsp;&amp;nbsp;&amp;nbsp; //make a map extent around the mapclick point
&amp;nbsp;&amp;nbsp;&amp;nbsp; var dx, dy;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dx = dy = 10;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var extent = new esri.geometry.Extent(p.x - dx, p.y - dy, p.x + dx, p.y + dy, p.spatialReference);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphics = map.graphics.graphics;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var results = [];
&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i=0, il=graphics.length; i&amp;lt;il; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic = graphics&lt;I&gt;;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //if point is contained within extent, highlight it and add for display in results list
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (extent.contains(graphic.geometry)) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(red);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; results.push(graphic.attributes);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //else if point was previously highlighted, reset its symbology
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (graphic.symbol == red) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(green);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; //if reults.length == 1, show the infoWindow for that graphic. If &amp;gt; 1, show an infoWindow offering a choice of the results.
&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(results);
}
&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I click on the map avoiding the points, the afterClick function is called. If I click on a point, the infoWindow for that point is shown, and afterClick is never called. How do I remove the onclick handler for the graphics?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:46:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747223#M69135</guid>
      <dc:creator>JamesBurton</dc:creator>
      <dc:date>2021-12-12T07:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Show featureset when clicking on several custom graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747224#M69136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry, I RTFM'd and its map.graphics.disableMouseEvents(). Thanks, nearly there &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 14:48:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747224#M69136</guid>
      <dc:creator>JamesBurton</dc:creator>
      <dc:date>2011-02-23T14:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Show featureset when clicking on several custom graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747225#M69137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have made some progress with this but I don't know how to diable the custom graphics onclick handlers. Here is the onClick handler I added to map:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function afterClick(evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log('afterclick');
&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(evt.mapPoint);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var p = evt.mapPoint;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var green = new esri.symbol.SimpleMarkerSymbol().setColor(
 new dojo.Color([0, 255, 0]));
&amp;nbsp;&amp;nbsp;&amp;nbsp; var red = new esri.symbol.SimpleMarkerSymbol().setColor(
 new dojo.Color([255, 0, 0]));
&amp;nbsp;&amp;nbsp;&amp;nbsp; //make a map extent around the mapclick point
&amp;nbsp;&amp;nbsp;&amp;nbsp; var dx, dy;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dx = dy = 10;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var extent = new esri.geometry.Extent(p.x - dx, p.y - dy, p.x + dx, p.y + dy, p.spatialReference);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphics = map.graphics.graphics;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var results = [];
&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i=0, il=graphics.length; i&amp;lt;il; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic = graphics&lt;I&gt;;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //if point is contained within extent, highlight it and add for display in results list
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (extent.contains(graphic.geometry)) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(red);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; results.push(graphic.attributes);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //else if point was previously highlighted, reset its symbology
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (graphic.symbol == red) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(green);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; //if reults.length == 1, show the infoWindow for that graphic. If &amp;gt; 1, show an infoWindow offering a choice of the results.
&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(results);
}
&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;When I click on the map avoiding the points, the afterClick function is called. If I click on a point, the infoWindow for that point is shown, and afterClick is never called. How do I remove the onclick handler for the graphics?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since the map.graphics layer in always on top, the onclick event on graphics are fired first. to avoid that, you might have to use map.graphics.disableMouseEvents() to disable onclick for graphics, and after your afterClick is fired, enable onclick event on graphics using map.graphics.enableMouseEvents() to enable onclick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:46:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-featureset-when-clicking-on-several-custom/m-p/747225#M69137</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2021-12-12T07:46:47Z</dc:date>
    </item>
  </channel>
</rss>

