laptop and a wrench

Error

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

Última publicación: June 14, 2018 ArcGIS Runtime SDK
Número de ID del error BUG-000113123
EnviadoApril 11, 2018
Última modificaciónJune 5, 2024
Relacionado conArcGIS Runtime SDK
Versión encontrada100.2.1
Sistema operativoWindows OS
Versión de sistema operativo10.0 64 Bit
EstadoWill Not Be Addressed

Información adicional

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; } ```

Solución alternativa

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());

Pasos para reproducir

ID del error: BUG-000113123

Software:

  • ArcGIS Runtime SDK

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga