Select to view content in your preferred language

Controlling drawing order within FeatureLayer

2577
0
06-09-2015 02:06 PM
deleted-user-m6DuRVNpNiGp
Deactivated User

Hello:

Is there a way to control the order in which features draw within a FeatureLayer using a UniqueValuesRenderer? I thought I had read somewhere that you could by using the orderByFields parameter when constructing a layer, but that doesn't appear to work at all.

The interesting this is the I have checkboxes in my application that allow visitors to turn certain categories of unique values off and on. Each time they do so, I build the layer's renderer, defining symbols only for those unique values that are selected, and then run the layer.redraw() method. After that, the unique values that were just switched are rendering on top. So let's say I want value "A" to always be on top of value "B". If I switch off value "A" and "B", select "B", and then select "A", then "A" is drawn last, on top of B. If I select "A" and then "B", "B" is drawn last, on top of "B". I want "A" to always be on top of "B". If that's not possible, I want "A" to be on top of "B" when I initially draw the layer.

If it would be helpful I can share the app. Thanks.

- geoff

0 Kudos
0 Replies