Hi,
how can I programmatically control the draw order of my AcMapLayer layers?
I have a map with a "tree of layers" in it (multiple AcMapLayerGroup objects + multiple AcMapLayer objects).
Because the tree structure does not match the desired draw order of the layers, I want to change the draw order programmatically.
How can I do this?
I've already fumbled around a bit with the AcMapLayer.Group property.
I thought that
1. setting the AcMapLayer.Group to null
2. and then setting the AcMapLayer.Group to the group that I want
could solve the problem.
But the behavior ist quite strange - is there any other way to set the group of a layer?
So this workaround (http://adndevblog.typepad.com/infrastructure/2012/08/get-and-set-acmaplayer-order-using-map-3d-platf... does not work for me, because I have to use groups.
Regards,
Markus
Solved! Go to Solution.
Solved by woehling. Go to Solution.
I've investigated the problem further and found a solution for me.
The main problem was that I used AcMapMap.AddLayersAsync(), which seems to cause some consequential errors (e.g. draw order of the layers is reversed)
I'm now using AcMapMap.GetLayers().Add(), and the behavior is "not so strange" after all.
I had to fumble around with AcMapLayer.SetOrder() to get the tree structure that I wanted.
Now everything works fine for me.
Markus