getLegendUrl for WebTiledLayer?

776
1
Jump to solution
10-09-2014 08:58 AM
deleted-user-Jie3eyjOl9XM
Occasional Contributor

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?

0 Kudos
1 Solution

Accepted Solutions
deleted-user-Jie3eyjOl9XM
Occasional Contributor

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.

View solution in original post

0 Kudos
1 Reply
deleted-user-Jie3eyjOl9XM
Occasional Contributor

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.

0 Kudos