And why not use the Legend control? From 2.3, it supports WMS layers.
Technically, the use case is to simply be able to display a legend for the WMS layer.
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.