Commit 1c22a49a authored by fengruiyu's avatar fengruiyu

js两次

parent 37c15098
......@@ -211,12 +211,13 @@ var vm = new Vue({
},
B_initmap: function (point, zoomLevel) {
this.NOWUSEBAIDU = true;
console.log("initB==>", point, zoomLevel)
// setTimeout(function () {
if (zoomLevel == undefined || zoomLevel == null)
zoomLevel = 6;
var th = vm;
if (th.B_MAPINITED == false) {
console.log(">>>>>>>initB==>", point, zoomLevel)
th.B_MAPINITED = true;
// 百度地图API功能
// $("#map").hide();
......@@ -247,7 +248,14 @@ var vm = new Vue({
} else {
B_MAP.centerAndZoom(new BMap.Point(point.lng, point.lat), zoomLevel); // 初始化地图,设置中心点坐标和地图级别
console.log(">>>>>>>", point, B_MAP.getCenter())
setTimeout(function(){
B_MAP.centerAndZoom(new BMap.Point(point.lng, point.lat), zoomLevel); // 初始化地图,设置中心点坐标和地图级别
},500)
//console.log(">>>>>>>", point, B_MAP.getCenter())
console.log(">>>>>>>cB==>", B_MAP.getCenter().lat, B_MAP.getCenter().lng, zoomLevel)
}
// },500)
},
......@@ -285,11 +293,11 @@ var vm = new Vue({
G_MAP.setCenter(point)
}
if (!this.NOWUSEBAIDU && this.B_MAPINITED) {
var bpoint = toBPoint(point)
console.log("同步百度中心")
B_MAP.setCenter(bpoint)
}
// if (!this.NOWUSEBAIDU && this.B_MAPINITED) {
// var bpoint = toBPoint(point)
// console.log("同步百度中心")
// B_MAP.setCenter(bpoint)
// }
}
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment