Map feature layer redering priority

420
2
02-07-2013 12:01 AM
ManojrajTeli
Occasional Contributor II
I am displaying polygon,line and point feature layer on button click event and adding layer in order of polygon at bottom,line layer on top of polygon and point on line layer.In certain cases layers are rendered fine as we add but in some cases as data increases(Response Time) in one of the layer the polygon layer is rendered on top of the point and line layer and these layers get hidden.We have already used reordering code but its not much of use. Is there any methods to control the rendering of layer or move layers one above the other.I am using arcgis server 10.1,feature service and arcgis javascript api 3.1 .
0 Kudos
2 Replies
RahulMetangale1
Occasional Contributor II
Manoj,

Try map.addLayer(layer, index?)

Regards,
Rahul
0 Kudos
ManojrajTeli
Occasional Contributor II
Thanks for the comment.I have already tried it.since polygon layer has multi polygon features it takes time to render and whatever index we give it is of the index of the we can see in map._layer  but it get rendered in different order.
0 Kudos