AnsweredAssumed Answered

Highlighting multiple feature layer geometries

Question asked by bundarrabandito on Jan 6, 2012
Latest reply on Jan 10, 2012 by stevel
Hi all,

I am displaying multiple feature layers in my app and would like to highlight the geometry onmouseover for whichever layers are visible at any one time.  Does anyone know how to adapt the following code for use with multiple feature layers:

dojo.connect(map,"onClick",function(evt){
  var query = new esri.tasks.Query();
  query.geometry = pointToExtent(map,evt.mapPoint,10);
 
  var deferred = featureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);

   map.infoWindow.setFeatures([deferred]);
   map.infoWindow.show(evt.mapPoint);
   
});

I've tried using an array but that doesn't work.  Related question - the above function works when clicking the map but does anyone know how to achieve the same but only clicking on the feature layer?

Thanks in advance for any help.

Outcomes