Show/Hide Features Based on Attribute Data

596
2
Jump to solution
09-25-2013 01:22 PM
MStayner
New Contributor III
I would like to be able to show/hide features based on their attribute data.  Does anyone have a sample of something similiar?  Can you point me in a direction to investigate?
0 Kudos
1 Solution

Accepted Solutions
JasonZou
Occasional Contributor III
Create a feature layer, and use setDefinitionExpression to filter the features based on their attribute data. Here is a sample.

View solution in original post

0 Kudos
2 Replies
JasonZou
Occasional Contributor III
Create a feature layer, and use setDefinitionExpression to filter the features based on their attribute data. Here is a sample.
0 Kudos
MStayner
New Contributor III
That is exactly what I was looking for.  Thanks!

I didn't think it could be so easy.  I just added one line of code:

myLayer.setDefinitionExpression("attName= 'att'");
0 Kudos