javascript - 以编程方式将 3-D 形状添加到必应 map (虚拟地球)

标签 javascript 3d bing-maps

如何以编程方式将 3-D 形状添加到 Bing map (虚拟地球)?

最佳答案

下面是一些应该对您有所帮助的代码:

var map = new VEMap('map_div_id');

// Put you points together and into an array, the 10.0 below is meters above the ground
var point1 = new VELatLong(45.01188,-111.06687, 10.0);
var point2 = new VELatLong(45.01534,-104.06324, 10.0)
var point3 = new VELatLong(41.01929,-104.06, 10.0);
var point4 = new VELatLong(41.003,-111.05878, 10.0);
var points = [point1, point2, point3, point4, point1];

var shape = new VEShape(VEShapeType.Polygon, points);
map.AddShape(shape);

有关详细信息,请参阅以下内容:
VELatLong Class
VEShape Class
AddShape Method

关于javascript - 以编程方式将 3-D 形状添加到必应 map (虚拟地球),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1320829/

相关文章:

Javascript 将电话号码填充到 3 个输入文本框中,名称相同但没有 id

javascript - 如何使轮播具有最大宽度,并在不调整大小的情况下加载

algorithm - 查询 3d 点

java - 我应该如何在Java中实现马氏距离函数?

Java 升级后 OSX 上的 JavaFX 渲染问题

javascript - 使用来自数据库的位置坐标在 Bing map 上实现 pointInpolygon 搜索算法

javascript - 测试变量是否在javascript中定义?

javascript - 重构这个 javascript 代码

c# - WP7,将服务引用添加到 Visual Studio 2010 后如何使用它

javascript - Bing Maps API v7 限制