Public Overloads Sub FlashFeature( _ ByVal features As SelectionSet _ )
public void FlashFeature( SelectionSet features )
Parameters
- features
- The collection of layers and corresponding Object IDs to flash.
Public Overloads Sub FlashFeature( _ ByVal features As SelectionSet _ )
public void FlashFeature( SelectionSet features )
{
// Note: Needs QueuedTask to run
{
//Get the selected features from the map and filter out the standalone table selection.
var selectedFeatures = mapView.Map.GetSelection();
//Flash the collection of features.
mapView.FlashFeature(selectedFeatures);
}
}
internal class CustomIdentify : MapTool { public CustomIdentify() { IsSketchTool = true; SketchType = SketchGeometryType.Rectangle; //To perform a interactive selection or identify in 3D or 2D, sketch must be created in screen coordinates. SketchOutputMode = SketchOutputMode.Screen; } protected override Task<bool> OnSketchCompleteAsync(ArcGIS.Core.Geometry.Geometry geometry) { return QueuedTask.Run(() => { var mapView = MapView.Active; if (mapView == null) return true; //Get all the features that intersect the sketch geometry and flash them in the view. var results = mapView.GetFeatures(geometry); mapView.FlashFeature(results); var debug = System.String.Join("\n", results.ToDictionary() .Select(kvp => System.String.Format("{0}: {1}", kvp.Key.Name, kvp.Value.Count()))); System.Diagnostics.Debug.WriteLine(debug); return true; }); } }
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)