I am going through Generate renderer sample in ArcGIS Java Script API and I want to make similar example using my rest service.

I am going through the sample REST service and wondering that how they created dynamic legend in REST?

I searched and tried to generate the dynamic legend at my end but its not displaying in REST. I am classifying data in Arc Map (using layer properties--symbology) and publishing on server but not getting dynamic legend..

So any help will be great !! thanks in advance : )

Software's : ArcGIS Server & Desktop 10.1 and JSAPI 3.2/3.3

1 Answer 1


You'll need to use the Legend dijit. You can find documentation here:


You can see a working example here:



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.