Show featureset when clicking on several custom graphics

Discussion created by jaybee18 on Feb 18, 2011
Latest reply on Feb 23, 2011 by hzhu
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!

/* draw a set of sightings as points on the map */
    function drawSightings(data) {
 var point, colour, sighting;
 //draw the points
 for (var i=0; i < data.length; i++) {
     sighting = data[i];
     point = {"geometry":{"x": sighting.x,
     "y": sighting.y,
     "spatialReference": map.spatialReference},
    "number_observed": sighting.number_observed
    "color": [255, 0, 0, 128],
    "title": " ${common_name} [${scientific_name}]",
    "content": "Number seen: ${number_observed}"
     graphic = new esri.Graphic(point);