AnsweredAssumed Answered

Select features sample not actually selecting features

Question asked by bpstewar on Apr 30, 2012
Latest reply on Apr 30, 2012 by DSwingley-esristaff
I am using the sample here ( on my own data. I have successfully implemented it once using a feature service from ArcGIS Online ( However, when I try to replace it with my own feature service (sorry, behind my firewall, no link) the event that is fired "onDrawEnd" does not have a reference to the relevant layer (featureLayer in block below).

Am I missing something? I don't know why the featureLayer reference is not working for one link when it worked for the other. Both versions show the features on the map fine.

function initSelectToolbar(map) {  //This little bit is to enable drawing for item selection  selectionToolbar = new esri.toolbars.Draw(map);  var selectQuery = new esri.tasks.Query();   dojo.connect(selectionToolbar, "onDrawEnd", function(geometry) {   selectQuery.geometry = geometry;   featureLayer.selectFeatures(selectQuery, esri.layers.FeatureLayer.SELECTION_NEW);   selectionToolbar.deactivate();  });  }