var ggPoint = new BMap.Point(
116.32715863448607
,
39.990912172420714
);//GWS84坐标(GPS)
translateCallback = function (data){
if(data.status === 0) {
console.log(data.points[0]);//转换后的经纬度坐标
}
}
var convertor = new BMap.Convertor();
var pointArr = [];
pointArr.push(ggPoint);
convertor.translate(pointArr, 1, 5, translateCallback);//1表示84坐标,3表示google坐标,5表示百度坐标
百度坐标转换接口功能介绍:
http://lbsyun.baidu.com/index.php?title=webapi/guide/changeposition
网友评论