Windows Phone Bing 地图上的 TileOverlay?

发布于 2024-12-27 18:40:37 字数 137 浏览 4 评论 0原文

对于我的 Windows Phone Mango 应用程序,我想在 Bing 地图上叠加热图,而平铺叠加似乎是实现此目的的最佳方法。我一直无法找到任何好的文档或代码示例来使用。似乎大多数人都将图块源指向 Web 服务。我宁愿在手机本身上渲染热图 - 这可能吗?

For my Windows Phone Mango app, I want to make overlay a heatmap on Bing Maps, and a tile overlay seems the best way to do it. I've been having trouble finding any good documentation or code samples to work from. It seems like most people are pointing the tile source to a web service. I'd rather render the heatmap on the phone itself - is that possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自控 2025-01-03 18:40:37

使用tilelayers来表示地图上的数据的主要原因之一是创建图层所涉及的计算和渲染是提前执行的,通常作为一次性或不频繁的任务。然后,在运行时,客户端需要做的唯一工作就是从服务器检索预渲染的图块图像并将其直接显示在地图上,这是一个简单的低资源活动。

无论是在处理方面还是在内存使用方面,渲染图块都可能是一项资源密集型任务 - 例如,在具有 8Gb RAM 的四核台式机上,我每秒只能渲染大约 3 个图块。即使技术上可以在手持设备上动态创建图块,但其性能几乎肯定会让任何用户无法接受。您还面临如何存储创建图层的数据的问题。既然您正在谈论绘制热图,我猜您有一个相当大的点数据集 - 您是否设想将这些数据存储在设备本地或通过网络检索? (两者都会产生不同的问题)。

基本上,虽然理论上可以在客户端动态创建图块层,但这样做会首先否定使用图块层的几乎所有好处,这就是为什么您可能找不到任何解释如何执行此操作的代码示例。也许您可以解释一下您的评论为什么您宁愿在手机上创建热图?

使用 .NET 或 PHP 创建服务器端图块渲染器非常容易,该渲染器将图块图像渲染并服务器到 Bing 地图客户端,或者您也可以使用现有的地图渲染库,例如 mapnik.org 或 geoserver.org。

One of the main reasons to use tilelayers to represent data on a map is that the computation and rendering involved in creating the layer is performed in advance, generally as a one-off or infrequent task. Then, at runtime, the only work the client needs to do is to retrieve the pre-rendered tile images from the server and display them straight on the map, which is a simple, low-resource activity.

Rendering tiles can be a resource-intensive task, both in terms of processing and memory usage - for example, I can only render about 3 tiles per second on a quadcore desktop machine with 8Gb RAM. Even if it's technically possible to create the tiles dynamically on a handheld device, the performance is almost certainly going to be unacceptable for any user. You've also got the question of how you're going to store the data from which the layer is created. Since you're talking about plotting a heatmap, I'm guessing you have a reasonably large dataset of points - did you envisage these stored locally on the device, or retrieved over the network? (either will create different problems).

Basically, while it may be theoretically possible to create tile layers dynamically on the client, doing so would negate almost any benefit of using tilelayers in the first place, which is why you probably won't find any code samples explaining how to do so. Perhaps you could explain your comment why you'd rather create the heatmap on the phone?

It's pretty easy to create a server-side tile renderer using .NET or PHP that renders and server tile images to a Bing Maps client, or you can use an existing map rendering library such as mapnik.org or geoserver.org.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文