Currently, using the JavaScript API Legend dijit, the legend makes a request to the template url, like /level/row/col/legend. Obviously, that won't work.
Some people want to turn off that layer in the legend, for example:
Prevent invalid legend layers (e.g., WebTiledLayer) from being sent to legend widget
But, I'd like to provide my own legend data for the layer.
1) Is there an undocumented getLegendUrl method that my class can implemented?
if not:
2) Without having access to the source code, is there some private method I can override as a hack until the dijit supports WebTiled layers?
Solved! Go to Solution.
I asked a dumb question. I forgot that I'm using the Spriggs' widget, which is a wrapper for the esri Legend dijit. This widget is manually making the calls to /legend on all of the layers. All I need to do is filter out the WebTiledLayer, and replace those calls with my own calls.
Duh.
I asked a dumb question. I forgot that I'm using the Spriggs' widget, which is a wrapper for the esri Legend dijit. This widget is manually making the calls to /legend on all of the layers. All I need to do is filter out the WebTiledLayer, and replace those calls with my own calls.
Duh.