laptop and a wrench

漏洞

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

上次发布: June 14, 2018 ArcGIS Runtime SDK
漏洞 ID 编号 BUG-000113123
已提交April 11, 2018
上次修改时间June 5, 2024
适用范围ArcGIS Runtime SDK
找到的版本100.2.1
操作系统Windows OS
操作系统版本10.0 64 Bit
状态Will Not Be Addressed

附加信息

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

解决办法

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

重现步骤

漏洞 ID: BUG-000113123

软件:

  • ArcGIS Runtime SDK

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项