Hi,I use a draw tool to select features like this: function initSelectToolbar(map) {
featureLayer = new esri.layers.FeatureLayer("http://localhost:6080/arcgis/rest/services/carte1/MapServer/0", {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
console.log(featureLayer);
selectionToolbar = new esri.toolbars.Draw(map);
selectionToolbar.activate(esri.toolbars.Draw.FREEHAND_POLYGON);
var selectQuery = new esri.tasks.Query();
var fieldsSelectionSymbol = new esri.symbol.SimpleMarkerSymbol(
esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND,
20,
new esri.symbol.SimpleLineSymbol(
esri.symbol.SimpleLineSymbol.STYLE_SOLID,
new dojo.Color([88,116,152]), 2
),
new dojo.Color([88,116,152,0.45])
);
selectionToolbar.on("draw-end", function(geometry) {
selectionToolbar.deactivate();
selectQuery.geometry = geometry;
selectQuery.geometry.spatialReference = sr;
featureLayer.selectFeatures(selectQuery, esri.layers.FeatureLayer.SELECTION_NEW);
featureLayer.setSelectionSymbol(fieldsSelectionSymbol);
map.addLayer(featureLayer);
});
}
I receive an error 400 Missing Parameters when selectFeatures() is performed.What could be the error?Thank you for your help