Question

Hi I'm confused how to render only some parts of a feature layer. Since all the given classbreak rendering samples are rendering the whole feature layer, is there any method to render only a few of the polygons in the feature layer (already have the Object IDs). Thanks in advance!

Was it helpful?

Solution

The traditional way is by calling setDefinitionExpression() on the FeatureLayer, assuming there is a distinct property of the features you want to display. If you already have the OIDs, and there's no distinct property, you could set the expression to OID = 1 OR OID = 2 OR OID = 3..., but that might get messy in a hurry.

I think you might also be able to do it using the ClassBreaksRenderer and setting the other symbols to null...?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top