var ggPoint = new BMap.Point(
116.32715863448607
,
39.990912172420714
);//GWS84坐標(biāo)(GPS)
translateCallback = function (data){
? ? ? if(data.status === 0) {
? ? ? console.log(data.points[0]);//轉(zhuǎn)換后的經(jīng)緯度坐標(biāo)
? ? ? }
? ? }
? ? ? ? var convertor = new BMap.Convertor();
? ? ? ? var pointArr = [];
? ? ? ? pointArr.push(ggPoint);
? ? ? ? convertor.translate(pointArr, 1, 5, translateCallback)窃肠;//1表示84坐標(biāo)痘煤,3表示google坐標(biāo)士骤,5表示百度坐標(biāo)
百度坐標(biāo)轉(zhuǎn)換接口功能介紹:
http://lbsyun.baidu.com/index.php?title=webapi/guide/changeposition