详细问题描述
[内容]
内置地图setCenter和setZoom某些情况下不能同时执行
重现步骤
map.setCenter(pos);
map.setZoom(18);
只能执行第一个,第二个不执行,map.centerAndZoom函数也是如此
[步骤]
加个定时器可以解决,但是执行顺序不能颠倒
var pos = new plus.maps.Point(parseFloat(item.getAttribute("lng")), parseFloat(item.getAttribute("lat")));
map.setZoom(18);
setTimeout(function(){
map.setCenter(pos);
UIValue.marker.setPoint(pos);
},200);
[mui版本]
Mui v3.6.0 (http://dev.dcloud.net.cn/mui)
0 个回复