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
Tyler,
The Legend dijit has a layerInfo property for manually specifying layers but it has this:
<SPAN class=""><A href="https://developers.arcgis.com/javascript/3/jsapi/layer-amd.html" style="color: #00629b; text-decoration: none;" rel="nofollow noopener noreferrer">Layer</A></SPAN>
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.
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?
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.