I try to select Points with different selection methods in a Feature layer.
If I try SELECTION_ADD or SELECTION_NEW or SELECTION_SUBTRACT the selection is always like SELECTION_NEW and the result-Method is always "3".
lyrZE.selectFeatures(selectQuery,
//lyrZE.SELECTION_ADD,
lyrZE.SELECTION_NEW,
//lyrZE.SELECTION_SUBTRACT,
function(RE_Geometry,RE_Method){
console.log(RE_Geometry);
console.log(RE_Method)
});
I need the add and subtract method.
thx
Thomas
Solved! Go to Solution.
You're not using the correct value for the selection method constants. These are derived from the "FeatureLayer" class (FeatureLayer.SELECTION_NEW, FeatureLayer.SELECTION_ADD), not your variable lyrZE (lyrZE.SELECTION_ADD).
You're not using the correct value for the selection method constants. These are derived from the "FeatureLayer" class (FeatureLayer.SELECTION_NEW, FeatureLayer.SELECTION_ADD), not your variable lyrZE (lyrZE.SELECTION_ADD).
Thanks you're right
This is the example from Esri:
featureLayer.selectFeatures(selectQuery,
FeatureLayer.SELECTION_NEW);
I didn't recognizes the case sensitiv variable. I did change all FeatureLayer/featureLayer instead of only featureLayer.
Thomas