Select to view content in your preferred language

Transparency based on a field attributes

624
2
05-07-2013 03:07 AM
AdrianMarsden
Honored Contributor
Not sure I can add more to the title 🙂 Anyone know how I can, either at the ArcMap/Server side on at runtime JSAPI side set transparency of a point layer based on the attribute in a field - the aim is more recent events to have a more solid setting?

Cheers

ACM
0 Kudos
2 Replies
SteveCole
Honored Contributor
Pretty sure this kind of dynamic transparency isn't supported. You either have transparency for all features in the layer or not. The only hack-ish way I can think of to do this would be something like this:


  1. At load time, get all your point features and determine how many features would go into 10%, 20%, etc groupings.

  2. Sorting your list of features by FeatureID (surrogate for feature "age"), divvy up the features into several different new arrays of features

  3. Now create new featureLayers for each individual array of features and then apply your graduating transparencey to each


FeatureLayer1 (80% transparency)
FeatureLayer2 (60% transparency)
FeatureLayer3 (40% transparency)
FeatureLayer4 (20% transparency)
FeatureLayer5 (0% transparency)

Hopefully you don't need to edit the features. Ugly, ugly, ugly.
0 Kudos
AdrianMarsden
Honored Contributor
:DI think that is more or less what my colleague is going to do.  Thanks anyway.

ACM
0 Kudos