This project has moved. For the latest updates, please go here.

Help: Highlighting in v2.0

Topics: SharpMap v2.0
Aug 12, 2008 at 2:49 PM
Hello, I've heard that in SharpMap v2.0

Highlighting a feature, and selecting a rectangular area is achieved

How could I do that?

Aug 14, 2008 at 8:47 AM

Any opinion? or help?
Aug 15, 2008 at 5:09 PM
Hey LordCover -

It is possible. The SharpMap.Layers.FeatureLayer has a "SelectedFilter" and a "HighlightedFilter" to control which features are displayed in the "SelectedFeatures" and "HighlightedFeatures" views respectively.

You might set it like this:

SpatialBinaryExpression spatialExpression = SpatialBinaryExpression.Intersects(new FeaturesCollectionExpression(filterLayer.Features), 
new ExtentsExpression(worldBounds));

filterLayer.SelectedFilter new FeatureQueryExpression(new AllAttributesExpression(), spatialExpression