WebTiledLayer doesn't work with BasemapGallery dijit

Discussion created by flspat on May 22, 2013
Hello All:

Has anyone been able to get a custom web tiled layer to work with the Basemap Gallery widget?  I've tried a few different version of the web tiled layer code and different services but no luck... I've verified the WTLs work when added as an operational layer but when selected from the gallery dijit, nothing.  In the browser debugger, I see the url being sent but it's incorrect.... doesn't appear the url isn't getting "parsed" and filled in with the level, row, col information.  Here's a jsfiddle example --- sort of a combination of the bing/custom basemap dijit sample and the opencyclemap sample. 



MORE INFO:   I've been watching how the other base layers work and i think the gallery/layer is trying to make a call to determine if it's a tile or dynamic service rather than simply going straight for the tiles... Since the WTL works a regular layer, is there a property to set so the "what is this" call is skipped or is this a oversight in the basemap gallery code?

MORE MORE INFO:  After looking under the hood a little more, it looks like sort of 'dumb luck' (aka javascript is a loosely typed language) that I could add the web tile layer to the basemap gallary and it found a "url" property and started the process of loading the layer rather than just blowing up earlier.  At this point it doesn't look like having custom tiled layers as gallery basemaps will work and I'll have to build custom basemap gallery.  I posted support of the concept on Ideas here: http://shar.es/Zka4R