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.
Solved! Go to Solution.
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:
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:
Thanks for the help Robert.