public void FlashFeature( SelectionSet features )
Public Overloads Sub FlashFeature( _ ByVal features As SelectionSet _ )
Parameters
- features
- The collection of layers and corresponding Object IDs to flash.
public void FlashFeature( SelectionSet features )
Public Overloads Sub FlashFeature( _ ByVal features As SelectionSet _ )
public Task FlashSelectedFeaturesAsync() { return QueuedTask.Run(() => { //Get the active map view. var mapView = MapView.Active; if (mapView == null) return; //Get the selected features from the map and filter out the standalone table selection. //At 2.x //var selectedFeatures = mapView.Map.GetSelection() // .Where(kvp => kvp.Key is BasicFeatureLayer) // .ToDictionary(kvp => (BasicFeatureLayer)kvp.Key, kvp => kvp.Value); ////Flash the collection of features. //mapView.FlashFeature(selectedFeatures); 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(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 = String.Join("\n", results.ToDictionary() .Select(kvp => String.Format("{0}: {1}", kvp.Key.Name, kvp.Value.Count()))); System.Diagnostics.Debug.WriteLine(debug); return true; }); } }
Target Platforms: Windows 11, Windows 10