I think I am doing something wrong. When I use the Legend for the example in API javascript I get an extra layer that is not on my map named other. How do I remove this from my Legend.
set the legend property "defaultsymbol:false"
If you look here: Legend | API Reference | ArcGIS API for JavaScript 3.17
It says in a few places that you can choose what layers display
<SPAN class=""><A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" style="color: #00629b;" rel="nofollow noopener noreferrer">Object[]</A></SPAN>
layerInfos
I render the layer in the web page. All the layer in that mxd are lines and points and one poly that is off.
What does the legend look like in the mxd for the service?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.