I have created custom feature layer and using it for GenerateRendererTask but nothing happening . My question is GenerateRendererTask will work in custom feature layer ? . If not what is the alternate method for doing class break renderer. I am attaching my code for reference.
Mohan,
The GenerateRendererTask is limited by the requirement:
The GenerateRendererTask is available for map service or tables that support the generateDataClasses operation (version 10.1 or greater)
Your FeatureLayer is coming from a FeatureCollection and not a Map Service so it will not work.
So you just need to setup the ClassBreaksRenderer manually like in this sample:
Class breaks renderer | ArcGIS API for JavaScript 3.22
Thanks for the help Robert.
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.