Hello everyone,
give a look at this sample:
It just adds a Tile layer to a LayerList widget (with api 4.8) and everything looks fine.
If you switch to 4.9 (API 4.9) you can see a totally different behaviour. It looks like that the tile layer becomes a group layer and every single sub layer is added as a layer. I don't think this is the intended behaviour.
Is it a bug?
Thanks,
Davide
Solved! Go to Solution.
Hi there,
It is an expected behavior at 4.9. TileLayer.sublayers property was added at 4.9. So you have to set the TileLayer.listMode to hide-children
to not show the sublayers information as shown below:
var layer = new TileLayer({
url: "https://sit5.sistemigis.it/sit/rest/services/Demo/DemoCache/MapServer",
title: "Tile layer",
listMode: "hide-children"
});
Hi there,
It is an expected behavior at 4.9. TileLayer.sublayers property was added at 4.9. So you have to set the TileLayer.listMode to hide-children
to not show the sublayers information as shown below:
var layer = new TileLayer({
url: "https://sit5.sistemigis.it/sit/rest/services/Demo/DemoCache/MapServer",
title: "Tile layer",
listMode: "hide-children"
});
Hey Davide Limosani, there actually is a bug here but the workaround Undral Batsukh provided is a good one! thanks for letting us know about the issue.
-Matt