public static async Task <bool> FlashResultPolygonsAsync( [NotNull] MapView activeView, [NotNull] IDictionary <Feature, Geometry> resultFeatures, int maxFeatureCountThreshold = 5) { if (resultFeatures.Count > maxFeatureCountThreshold) { _msg.InfoFormat("{0} have been updated (no feature flashing).", resultFeatures.Count); return(false); } var polySymbol = SymbolFactory.Instance.DefaultPolygonSymbol; foreach (Geometry resultGeometry in resultFeatures.Values) { if (!(resultGeometry is Polygon poly)) { continue; } using (await activeView.AddOverlayAsync(poly, polySymbol.MakeSymbolReference())) { await Task.Delay(400); } } return(true); }
private async Task <bool> FlashAsync(MapView activeView, IDictionary <Feature, Geometry> resultFeatures) { if (resultFeatures.Count > 5) { _msg.InfoFormat("{0} have been updated. No flashing will be performed.", resultFeatures.Count); } var polySymbol = SymbolFactory.Instance.DefaultPolygonSymbol; foreach (Geometry resultGeometry in resultFeatures.Values) { using (await activeView.AddOverlayAsync(resultGeometry, polySymbol.MakeSymbolReference())) { await Task.Delay(400); } } return(true); }