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!

有帮助吗?

解决方案

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...?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top