laptop and a wrench

Bogue

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

Dernière publication: June 14, 2018 ArcGIS Runtime SDK
Numéro d’ID de bogue BUG-000113123
EnvoiApril 11, 2018
Dernière modificationJune 5, 2024
S’applique àArcGIS Runtime SDK
Version trouvée100.2.1
Système d’exploitationWindows OS
Version du système d’exploitation10.0 64 Bit
StatutWill Not Be Addressed

Informations supplémentaires

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

Solution de contournement

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

Étapes pour reproduire

ID de bogue: BUG-000113123

Logiciel:

  • ArcGIS Runtime SDK

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement