Greetings, I'd like to be able to add graphicsLayers into my legend instance. Has anyone added a graphicsLayer to the legend widget?
Thanks, Tyler
Solved! Go to Solution.
Tyler,
The Legend dijit has a layerInfo property for manually specifying layers but it has this:
<Layer > layer | Required | A layer to add to the legend. Valid layer types are: ArcGISTiledMapServiceLayer,ArcGISDynamicMapServiceLayer. |
Tyler,
The Legend dijit has a layerInfo property for manually specifying layers but it has this:
<Layer > layer | Required | A layer to add to the legend. Valid layer types are: ArcGISTiledMapServiceLayer,ArcGISDynamicMapServiceLayer. |
I saw that graphicsLayer is not a valid type. I'm wondering if there is a way to hack into the legend's DOM get the graphics layer's symbology and dynamically create some HTML to push into the legend wrapper. Has anyone doen anything like that?
Tyler,
I have never had the need to do that but you can basically do anything using DOM manipulation. You would juts dojo query for the #legendDiv and add you new dom element to that.