Hi, Morten,
Thanks so much for your reply!
You say "the order that the graphics are added in, is NOT necessarilythe order they are rendered in..." I have two comments in regard to this:
1) The ESRI API reference for Graphic.SetZIndex() method seems to contradictyour statement, but perhaps the doc is incorrect or I am misunderstandingsomething.
2) Regardless of the documentation, I am certain we've seen the behaviorchange I described going from 2.1 to 2.2, and it is extremely easy to demo, atleast on my machine (you know how that goes!) I even just made a local copy ofthe demo I previously attached, and the only difference (besides the map's newwraparound property, which I just set to false) between the two (that I'm awareof) is one uses the esri 2.1 dll, and the other uses the esri 2.2 dll. I ranfrom the debugger, and between each run I cleared IE and download caches, thereproduced the different behavior, and before exiting the debugger, I brokeinto the debugger and verified the expected esri dll module was being used. The2.1 version worked as the I and the API doc described (graphics always drawn inthe order added, even when panning on/off/on screen), and the 2.2 versionexhibited the changed behavior as I previously described (draws in the correctorder originally, but after panning the graphics in question off the screen andthen back on in various directions - top, bottom, left, right - the drawingorder gets reversed.) I guess this could just be some strange behavior from my machine,but that seems suspect. Can youreproduce this change in behavior?
3) In regard to your comment about layers vs. explicit zindex setting: inour case, the zindex setting is actually a better workaround than layers.Something I noticed is that this problem behavior not only impacts differentgraphic object types (polylines vs symbols) in a layer, but also impacts thedrawing order between different graphics of the same type (for example, polylines)in the same layer. We draw manypolylines, and sometimes they can partially overlap, and are sometimes in differentcolors. The problem behavior thus causesthe apparent rendering of the lines to change as the user pans objects on andback on screen; parts of lines originally obscured pop to the top, and then popback to the back. This makes ourapplication�??s rendering non-deterministic, which gives a poor impression. It is of course not practical for us to putevery polyline in a different layer, and it may not be reasonable to make surethat no lines overlap. So, we workedaround the problem for now by incrementing the zindex for each object as we addit to the layer (ob1.z=0, ob2.z=1, ob3.z=2, etc.)
I�??d be curious to hear what you think about these points. Thanks so much for your time, and an overallgreat, easy-to-use and powerful product!
Regards,
-Andy