Solved! Go to Solution.
fl.setSelectionSymbol(new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASH, new Color([255, 0, 0]), 3));
function selectState(e) {
// select the feature
var fl = map.getLayer("states");
var query = new Query();
//query.objectIds = [parseInt(e.target.innerHTML)];
var selection = [];
var selected = window.grid.selection;
if (selected) {
for (row in selected) {
selection.push(parseInt(row));
}
}
query.objectIds = selection;
fl.selectFeatures(query, FeatureLayer.SELECTION_NEW, function (result) {
if (result.length) {
// re-center the map to the selected feature
//window.map.centerAt(result[0].geometry.getExtent().getCenter());
} else {
console.log("Feature Layer query returned no features... ", result);
}
});
}
fl.setSelectionSymbol(new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASH, new Color([255, 0, 0]), 3));