Select to view content in your preferred language

ClassBreaksDefinition.classificationMethod = "manual" ?

1564
2
Jump to solution
09-28-2016 02:11 PM
TylerWaring
Frequent Contributor

Hi I'm noticing that there is no "manual" classification method listed in the Javascript documentation. Is there any way that I can set my breaks manually? My service's drawingInfo.renderer.classBreakInfos does indicate that the classification method is manual (i.e. "classificationMethod":"esriClassifyManual"). However, nothing in the documentation indicates that I can set these through the API. Anyone know how to manually define the class breaks renderer?  Thanks, Tyler  

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Tyler,

   When you add a break to the class breaks renderer you are manually defining it:

ClassBreaksRenderer | API Reference | ArcGIS API for JavaScript 3.18 | addBreak 

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Tyler,

   When you add a break to the class breaks renderer you are manually defining it:

ClassBreaksRenderer | API Reference | ArcGIS API for JavaScript 3.18 | addBreak 

0 Kudos
KristianEkenes
Esri Regular Contributor

Tyler Waring‌ Robert is correct. ClassBreaksDefinition is used for generating renderers with the GenerateRendererTask. Since you're looking at a manual classification, you don't need to generate them at all. Instead you manually add them directly to the ClassBreaksRenderer. There's no need to use ClassBreaksDefinition in this case.

When you do need to generate a renderer with another classification method, I would actually recommend using the smartMapping.createClassedColorRenderer() (or sizeRenderer()) methods instead of the GenerateRendererTask. It's pretty straightforward and accomplishes the same task with fewer modules (again, no need for ClassBreaksDefinition in this scenario either).

esri/renderers/smartMapping | API Reference | ArcGIS API for JavaScript 3.18 

I hope that helps!