如何使用 javascript 将 wms 图层添加到 bing 地图?

发布于 2024-09-12 09:29:48 字数 56 浏览 3 评论 0原文

如何使用 javascript 将 wms 图层添加到 bing 地图?有人知道有什么好的例子吗?

how do I add a wms layer to a bing map using javascript? anyone know any good examples?

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

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

发布评论

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

评论(2

鸵鸟症 2024-09-19 09:29:48

通常,我使用代理服务将四键转换为 wms 的正确坐标。可以在这里找到用 C# 编写此类代理服务作为 Web 处理程序的良好开端: http ://www.viawindowslive.com/Articles/VirtualEarth/AccessingWMSfromVirtualEarth.aspx

问题在于 bings 地图要求您指定图块 url 的方式。如果您没有被 bing 地图所束缚,那么使用 Google 地图 2.0 版或开放图层(如上面的海报所建议的那样),此类事情会容易得多。

Typically I've used a proxy service that translates the quad key to the proper coordinates of the wms. A good start for writing such a proxy service in C# as a web handler can be found here: http://www.viawindowslive.com/Articles/VirtualEarth/AccessingWMSfromVirtualEarth.aspx

The problem lies in the way that bings maps requires you to specify a tile url. If you're not locked into bing maps, this sort of thing is much easier with Google Maps version 2.0 or Open layers as the above poster suggested.

过潦 2024-09-19 09:29:48

如果您必须使用 WMS 作为切片服务器,那么我会认真考虑 OpenLayers
这非常适合混合不同的工具包和格式。例如。将 KML 覆盖放在 WMS 上,或者(如您的情况)将 WMS 放在 Bing 地图上。

如果您有自己选择的切片服务器并且有栅格,那么我会使用 MapCruncher 来代替,并将其本地加载到 Bing 地图中。

if you have to use WMS for the tile server, then I would seriously look at OpenLayers.
This is excellent at mixing different toolkits and formats. Eg. putting KML overlays over WMS, or (as in your case) WMS over Bing Maps.

If you have your own choice of tile server and you have rasters, then I would use MapCruncher instead and load it natively in Bing Maps.

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