if (that.wechat == 1) {
that.formatDegree(that.latitude);//纬度转度分秒
// console.log(that.formatDegree(that.latitude));
that.latitude = that.formatDegree(that.latitude);
that.formatDegree(that.longitude);//经度转度分秒
that.longitude = that.formatDegree(that.longitude);
}
var lng = res.longitude;//经度
var lat = res.latitude;//纬度
that.gcj2bdString(lng, lat);//GCJ-02纬度度调用方法转换成BD-09
that.baidulongitude = (that.gcj2bdString(lng, lat).lng).toFixed(5);//经度保留小数点后5位
that.baidulatitude = (that.gcj2bdString(lng, lat).lat).toFixed(5);//纬度保留小数点后5位
//判断是否开启经纬度转度分秒
if (that.wechat == 1) {
that.formatDegree(that.baidulongitude);//百度纬度转度分秒
that.baidulongitude = that.formatDegree(that.baidulongitude);
that.formatDegree(that.baidulatitude);//百度经度转度分秒
that.baidulatitude = that.for 《大厂前端面试题解析+Web核心总结学习笔记&