Layers = new MapImageLayer({
url:"http://0.0.0.0:6080/arcgis/rest/services/VISOR/MapServer",
sublayers:[
{
id: 2,
visible:true
},
{
id: 8,
visible: true
}
this works fine but when add 1 more id layer stop working, I'm based on this example MapImageLayer - Toggle sublayer visibility | ArcGIS API for JavaScript 4.13 , but I don't think it works very well either.
Can you help me?
Solved! Go to Solution.
Ulises,
Change the sublayers array to descending order (i.e. 8 then 2) and it will work.
Ulises,
Change the sublayers array to descending order (i.e. 8 then 2) and it will work.
Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.