How to define the drawing order of unique value symbols?

1937
2
01-05-2017 07:19 AM
TuukkaJärvinen
New Contributor III

Hi,

I have a problem with UniqueValueRenderer symbology. I have published a .mxd document to a ArcGIS Server as a feature service. I have defined the layer symbology in ArcMap.

ArcMap has this Symbol Levels feature:

I'm using it to define the drawing order of unique value symbols. Is there anyway to draw the symbols in the same defined order in the Runtime MapView using FeatureLayer and UniqueValueRenderer?

Currently the features are drawn this way in ArcMap:

and this way in the MapView of my application:

I'm using version 10.2.7 of Runtime SDK for .NET, version 10.3.1 of ArcMap and version 10.22 of ArcGIS Server.

Regards,

Tuukka J

0 Kudos
2 Replies
deleted-user-Ohz6rwd1kavx
New Contributor III

One way to solve this problem is to draw your data in multiple layers in the runtime Map. In your example you have 5 symbols, so you draw these 'in order' using 5 layers. You'll need to specify a filter/definition query for each layer to only draw the 1 symbol. Make sure to add the layers to the Map in the order in which you want the symbols to draw. Using this approach should work.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

It's not possible to determine the draw order of symbols in a unique value renderer. The draw order is determined by the order the features are returned from the database. 

Another alternative might be to retrieve all, or a subset of, the features from your database and put them in a GraphicsOverlay and display in Static rendering mode with a renderer using the same renderer properties (not the exact same renderer instance). You can then set the individual Graphic draw order (Z order). But it depends if you were trying to determine this in an automated way for all features/graphics or on an adhoc/user-driven basis. The GeometryEngine would allow you to determine which features effectively "contain" others (i.e. sit on top of), but if you have many features that could take some time to calculate. You might only need to do it for Graphics in the current view extent though? (e.g. recalculate on view extent changed).

Cheers

Mike

0 Kudos