Select to view content in your preferred language

FeatureLayer Selection Symbol

779
3
10-29-2010 08:58 AM
JustinGreco
Frequent Contributor
I've noticed in a few of the samples that when a polygon is selected, the graphic is highlighted by a yellow glow effect.  This appears to be the default symbol in the API.  However if I use the sample and use one of my feature layers, I do not get the yellow glow, its just a dark yellow line that is hard to see.  I get the yellow glow when I use a feature layer that uses points instead of polygons.  Any thoughts?
Tags (2)
0 Kudos
3 Replies
SarthakDatt
Frequent Contributor
Hey Justin,

The FeatureLayer internally uses a GlowFilter for the yellow glow.(http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filters/GlowFilter.html)

The GlowFilter.inner(http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filters/GlowFilter.html#inn...) property is set to true for polygons by default(case of adjacent polygons), thus overlaying on top of the color(symbol) of your polygon data set causing the dark yellow line.

You could try setting FeatureLayer.selectionColor to a color which produces the same effect as the samples.

Hope that helps.
0 Kudos
JustinGreco
Frequent Contributor
Thanks Sarthak,

So the GlowFilter is not part of the API for polygons?  I get the GlowEffect for point feature layers.  I think I know how to implement the GlowFilter, but I just thought it was built into the API.
0 Kudos
SarthakDatt
Frequent Contributor
The filter is applied to selected features on the featureLayer. You "see" the glow effect on points and lines as we have inner=false(default) on these geometry types, but for polygons we chose to have inner=true.

Right now, the only thing you can change on the 'filter' is the color(through the selectionColor property)
0 Kudos