I'm trying to use the selection drop down list "New" and is not working.Add and Subtract are working as expected. Could you please direct in what could be possibly be wrong in this?
protected function draw_drawEndHandler(event:DrawEvent):void
{
if (event.graphic.geometry.type == Geometry.EXTENT) // selecting features within an extent
{
var query:Query = new Query();
query.geometry = event.graphic.geometry;
//selectionQuery.geometry = event.graphic.geometry;
for each(var strId:String in _model.arrPricingPolygonLayerId.source)
{
var fLayer:FeatureLayer = map.getLayer(strId) as FeatureLayer;
if(fLayer.visible && fLayer.isInScaleRange)
{//selection will be performed only on currently visible layers
switch(selectedIndex)
{
case 0:
Alert.show("selection new");
fLayer.selectFeatures(query,FeatureLayer.SELECTION_NEW); break;
case 1:
fLayer.selectFeatures(query,FeatureLayer.SELECTION_ADD);
break;
case 2:
fLayer.selectFeatures(query,FeatureLayer.SELECTION_SUBTRACT);
break;
}
}
}
editor.editTool.deactivate();
}
}