Select to view content in your preferred language

Selection Color in Feature layer selection mode

2121
4
Jump to solution
04-25-2012 07:01 PM
Yusufalbanki
Deactivated User
Hi everybody,

I am using feature layer selection mode in my application, but I have problem with removing the selection color, because I already handle the selected features using renderer , so I do not need the selection color

Is there way to remove it or change its alpha to be invisible

Thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DasaPaddock
Esri Regular Contributor
There currently isn't an easy way to turn off the selection glow color, but a workaround is to listen for the selectionComplete event and then set the filters property on each selected graphic to an empty array.

View solution in original post

0 Kudos
4 Replies
IvanBespalov
Frequent Contributor
This way we work with selection symbol:

...
private var selectionSMS:SimpleMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 30, 0x00FF00, 0.5);
// private var selectionSMS:SimpleMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 6, 0x000000, 0);

...
/**
* Listen feature layer update end handler
*/
protected function onFeatureLayerUpdated(event:LayerEvent):void
{
    if (featureLayer.selectedFeatures != null && featureLayer.selectedFeatures.length > 0)
    {
        Graphic(featureLayer.selectedFeatures[0]).symbol = selectionSMS; // for points
    }
}
0 Kudos
Yusufalbanki
Deactivated User
Thank you for your reply,

I checked your code, but still the result of the selection surrounded with the selection color. Do you have another solution?

Regards,
Yusuf
0 Kudos
DasaPaddock
Esri Regular Contributor
There currently isn't an easy way to turn off the selection glow color, but a workaround is to listen for the selectionComplete event and then set the filters property on each selected graphic to an empty array.
0 Kudos
Yusufalbanki
Deactivated User
Thank you very much, it works
0 Kudos