In this WPF project, we show you how to highlight a feature when the user hovers the mouse pointer over it. This effect can be realized in Map Suite by using a timer and doing some spatial querying based on the location of the mouse pointer. This sample works with area-based features but the same could be accomplished with point- or line-based features simply by using different spatial queries.
Please refer to Wiki for the details.
This sample makes use of the following NuGet Packages
LayerOverlay highlightOverlay = (LayerOverlay)wpfMap1.Overlays["HighlightOverlay"];
ShapeFileFeatureLayer featureLayer = (ShapeFileFeatureLayer)((LayerOverlay)wpfMap1.Overlays["LayerFeatureOverlay"]).Layers["StatesLayer"];
InMemoryFeatureLayer highlightLayer = (InMemoryFeatureLayer)highlightOverlay.Layers["HighlightLayer"];
featureLayer.Open();
Collection<Feature> features = featureLayer.QueryTools.GetFeaturesContaining(point, ReturningColumnsType.NoColumns);
featureLayer.Close();
Map Suite Desktop for Wpf Wiki Resources
Map Suite Desktop for Wpf Product Description
This example makes use of the following APIs:
- ThinkGeo.MapSuite.Wpf.LayerOverlay
- ThinkGeo.MapSuite.Layers.ShapeFileFeatureLayer
- ThinkGeo.MapSuite.Layers.InMemoryFeatureLayer
- ThinkGeo.MapSuite.Shapes.Feature
Map Suite is a set of powerful development components and services for the .Net Framework.
ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.