Select to view content in your preferred language

Change FeatureLayer Graphic Selection Color

781
3
07-23-2010 03:16 AM
JoseSousa
Esri Contributor
Dear ArcGIS API for Flex Team,

After I perform a selection using FeatureLayer.select I get several features selected on the map with a very nice effect (the yellow border symbol).

The AttributeInspector shows the attributes of a single feature while several are selected. I can move to next feature or previous feature, but the simbology does not get affected.

What I want is to highlight the current feature in the AttributeInspector. I've noticed that it will be in the event showFeature. The problem is that there seems to be no way of changing that yellow color to another one just for this graphic. Changing the graphic.symbol changes the graphic simbology but the yellow color does not get affected.

Is there a way of doing this?

Thanks advanced,

José Sousa
ESRI Portugal
Tags (2)
0 Kudos
3 Replies
SarthakDatt
Frequent Contributor
Hey José,

Yes you are right. Right now, with the selectionColor property on the featureLayer you can have your own color but it would apply to all the selected features within that layer.

In your case, you could watch for the activeFeature property on the attribute inspector and whenever that is changed(moving through the attribute inspector), you could apply something like  a glow filter on the same(activeFeature).

To read more about the glow filter : http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/spark/filters/GlowFilter.htm...

Hope that helps.

-- Sarthak Datt
0 Kudos
JoseSousa
Esri Contributor
Hello Sarthak,

Awesome idea. I never thought of that.
I think it will work perfectly for now.

Thanks a lot,

José Sousa
ESRI Portugal
0 Kudos
CindyLu
Deactivated User
I got it!

Cindy
0 Kudos