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.
What does the legend look like in the mxd for the service?
I render the layer in the web page. All the layer in that mxd are lines and points and one poly that is off.
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
set the legend property "defaultsymbol:false"
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.