//gis根据一个点的经纬度、方位角、半径求下个点的经纬度 再画线
var poine2=getLonAndLat(data[0].lng,data[0].lat,data[0].azimuth,data[0].radius);
var polyline = new BMap.Polyline([
new BMap.Point(data[0].lng,data[0].lat),//起始点的经纬度
new BMap.Point(poine2.lng,poine2.lat)//终止点的经纬度
], {strokeColor:“blue”,//设置颜色
strokeWeight:2, //宽度
strokeOpacity:0.7});//透明度
map.addOverlay(polyline);
var circle = new BMap.Circle(point2,data[0].radius,{strokeColor:"blue", strokeWeight:2, strokeOpacity:0.5});
map.addOverlay(circle);
下面是经纬度获取脚本
/**
- 度换成弧度
- @param {Float} d 度
- @return {[Float} 弧度
/
function rad (d){
return d * Math.PI / 180.0;
};
/* - 弧度换成度
- @param {Float} x 弧度
- @return {Float} 度
/
function deg (x){
return x180/Math.PI;
};
/**