虚拟地球:确定最小/最大可见纬度/经度 [英] VirtualEarth: determine min/max visible latitude/longitude

查看:117
本文介绍了虚拟地球:确定最小/最大可见纬度/经度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种简单的方法来确定VirtualEarth地图中的最大和最小可见纬度和经度? 鉴于它不是平坦的表面(VE使用Mercator投影看起来像),我可以看到数学变得相当复杂,所以我认为有人可能知道要实现这一目标的代码段.

Is there an easy way to determine the maximum and minimum visible latitude and longitude in a VirtualEarth map? Given that it's not a flat surface (VE uses Mercator projection it looks like) I can see the math getting fairly complicated, I figured somebody may know of a snippet to accomplish this.

推荐答案

找到了! VEMap.GetMapView()返回边界矩形,甚至也适用于3D模式(边界甚至不是矩形).

Found it! VEMap.GetMapView() returns the bounding rectangle, even works for 3D mode as well (where the boundary is not even a rectangle).

var view = map.GetMapView();

latMin = view.BottomRightLatLong.Latitude;
lonMin = view.TopLeftLatLong.Longitude;
latMax = view.TopLeftLatLong.Latitude;
lonMax = view.BottomRightLatLong.Longitude;

这篇关于虚拟地球:确定最小/最大可见纬度/经度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆