laptop and a wrench

Bug

If the MapView.SetViewpointCenterAsync() method is called before MapView.ExportImageAsync(), the exported image is an incomplete display.

Zuletzt veröffentlicht: June 14, 2018 ArcGIS Runtime SDK
Bug-ID-Nummer BUG-000113123
EingereichtApril 11, 2018
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS Runtime SDK
Gefunden in Version100.2.1
BetriebssystemWindows OS
Betriebssystemversion10.0 64 Bit
StatusWill Not Be Addressed

Zusätzliche Informationen

The current behavior is by-design. ExportImageAsync exports the view as-is and does not wait for the rendering to complete. Additional code should be added to wait for draw status to report that rendering is complete before calling ExportImageAsync. e.g. ``` private static Task WaitForRenderCompleteAsync(MapView mapview) { TaskCompletionSource tcs = new TaskCompletionSource(); if (mapview.DrawStatus == DrawStatus.Completed) tcs.SetResult(null); else { EventHandler h = null; h = (s, e) => { if (e.Status == DrawStatus.Completed) { mapview.DrawStatusChanged -= h; tcs.SetResult(null); } }; mapview.DrawStatusChanged += h; } return tcs.Task; } ```

Workaround

Adding Task.Delay() with 1000 milliseconds works:await MyMapView.SetViewpointCenterAsync(_londonCoords, 1000);// Adding Task.Delay() works as belowawait Task.Delay(1000);imageView.Source = await RuntimeImageExtensions.ToImageSourceAsync(await MyMapView.ExportImageAsync());

Schritte zur Reproduzierung

Bug-ID: BUG-000113123

Software:

  • ArcGIS Runtime SDK

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln