I am adding three layers to a map in this order:basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapURL); map.addLayer(basemap); kml = new esri.layers.KMLLayer(kmlUrl); map.addLayer(kml); dataLayer = new esri.layers.GraphicsLayer(); map.addLayer(dataLayer);
When I print the layer.id for each I get the following:dataLayer = graphicsLayer2kml = layer1basemap = layer0I want my dataLayer to be the top layer but it seems no matter what I do the kml layer is on top. I tried reorderLayer and put the graphics layer in index 2 and still same result. How can I display the real order of all layers in a map and get my dataLayer on top?