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

时间:2009-08-24 06:59:48

标签: javascript 3d bing-maps

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

1 个答案:

答案 0 :(得分:1)

以下是一些可以帮助您的代码:

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