WebTiledLayer blank, never downloads

588
1
Jump to solution
11-18-2016 11:38 AM
DavidElies
New Contributor III

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? 

0 Kudos
1 Solution

Accepted Solutions
DavidElies
New Contributor III

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) });

View solution in original post

1 Reply
DavidElies
New Contributor III

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) });