When I try to create a WebTiledLayer and add it to the map, it creates the layer and adds it to the map just fine, but it doesn't display anything. When I watch the network traffic, no requests are made for that layer. If I pan and zoom, I can see the basemap and FeatureLayer requests as they are redrawn, but nothing for my WebTiledLayer. Is there a setting that might affect whether a WebTiledLayer needs to draw itself. Does the order in which it is added matter, or the index, or what type of other layers there are?
Solved! Go to Solution.
I found my problem. I had added my generic javascript object ("properties") as the tileInfo object, instead of creating a new TileInfo object from my properties.
Wrong:
new WebTiledLayer("https://template.url.com", { "tileInfo": tileInfoProperties });
Right:
new WebTiledLayer("https://template.url.com", { "tileInfo": new TileInfo(tileInfoProperties) });
I found my problem. I had added my generic javascript object ("properties") as the tileInfo object, instead of creating a new TileInfo object from my properties.
Wrong:
new WebTiledLayer("https://template.url.com", { "tileInfo": tileInfoProperties });
Right:
new WebTiledLayer("https://template.url.com", { "tileInfo": new TileInfo(tileInfoProperties) });