c# - 温特市的 Bing map

标签 c# windows-8 windows-runtime bing-maps

我有一张 map 和 15000 个图钉形式的点,要添加到 map 中。

我正在做的是,如果该点位于可见区域中,我会将其添加到 MapLayer 并将该图层添加到 map 对象。

这工作正常,但平移不太顺利。

我尝试使用 IAsyncOperation 创建 MapLayer,但我们无法在 IAsyncOperation 中操作或创建 UIElement。

有没有办法在后台创建 Maplayer 并替换当前的 Maplayer。

最佳答案

您是否尝试过将图钉集合绑定(bind)到MapItemsControl?这应该提供您所需的 UI 虚拟化,以使滚动更流畅。

示例

XAML

<bm:Map Name="MainMapView" Credentials="{StaticResource BingMapsApiKey}" Margin="0">
    <bm:MapItemsControl ItemsSource="{Binding MyPoints}" ItemTemplate="{StaticResource MyItemTemplate}" />
</bm:Map>

其中 MyPoints 是您的点集合,可在 View 模型中访问

关于c# - 温特市的 Bing map ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12318161/

相关文章:

c# - 使用 this.validateChildren() 时如何针对所有无效表单控件设置 errorProvider?

c# - Windows 8.1 是否更改了 SSDP 发现?

c++ - 用于 Metro 风格应用程序的 HTML/CSS 渲染器

http - WinRT 中的 HttpUtility.ParseQueryString 方法在哪里?

c# - 在 WPF 中将 BackgroundWorker 与 ProgressBar 结合使用

c# - 从 Web 服务实例化对象与从常规类实例化对象

c# - 将自定义类放入 C# 中的 ApplicationDataContainer (WinRT)

c++ - 在 UWP 中使用自定义视频效果

visual-studio-2012 - 有没有办法使用 Windows 7 开发机器创建 WinRT 应用程序?

c# - 使用 TLS 将 M2Mqtt.MqttClient 连接到 Mosquitto 代理时获取 AuthenticationException