|
发表帖子
API/SDK版本号: |
1.3 |
产品: |
|
手机型号: |
|
使用接口: |
|
本帖最后由 于 2017-6-5 19:22 编辑
在使用setCenter 中遇到定位不准的问题
但是这个也属于特定的情况
- var featureNode = _this.busLineMarkerList[index];
复制代码 (还发现这个编辑器有问题,不能一段代码放进去,写半天注释,全没提交上去,算了下面代码凑合看吧,实在懒得再写一遍了)
var index = i(this).data('index');
var featureNode = _this.busLineMarkerList[index];
console.log(featureNode.getPosition());
AMap.event.trigger(featureNode,'click');
_this.map.setZoom(15);
_this.map.setCenter(featureNode.getPosition());
setTimeout(function(){
console.log(_this.map.getCenter()
}, 2000)
这个偏移是比较特殊的情况,之前也一直没发现,也是最近偶然发现的。其他的点都没有发现这种问题
|
|