有没有可能使用 BING MAP 覆盖一个区域的方法。
转到此链接。
https://www.movinghelp.com/coverage.aspx?id=5924
我需要它的样子。
任何帮助将不胜感激。提前谢谢。
有没有可能使用 BING MAP 覆盖一个区域的方法。
转到此链接。
https://www.movinghelp.com/coverage.aspx?id=5924
我需要它的样子。
任何帮助将不胜感激。提前谢谢。
您需要使用Bing 地图 SDK。您必须创建一个以您感兴趣的区域为中心的 VEMap 类的实例,然后创建一个或多个 VEShape 实例并将它们添加到地图中。以下代码创建了一个覆盖印度范围的形状:
//Create map
map = new VEMap('myMap');
//Set center and zoom level
map.LoadMap(new VELatLong(22.268764039073965, 79.98046875),4);
//Create shape (area) with TL, TR, BR and BL coordinates
var shape = new VEShape(VEShapeType.Polygon,
[new VELatLong(32.84267363195431, 68.02734375),
new VELatLong(32.84267363195431,90.87890625),
new VELatLong(4.915832801313164,90.87890625),
new VELatLong(4.915832801313164,68.02734375)]);
//Format shape if needed
var fillColor = new VEColor(226, 224, 219,0.5);
shape.SetFillColor(fillColor);
//Add shape to map
map.AddShape(shape);
查看此处显示的示例以获取更多详细信息
看起来您创建了Shapelayer类的实例。当然,您需要一个Bing Maps API 帐户和SDK,我不知道这些是否容易获得。