收藏
回答

有关地图设置scale和中心坐标

当我在代码里一起设置一个点作为地图中心坐标,并且同时设置scale是,会有中心点偏移的问题,就是我要放到地图中心的那个点偏了,甚至到了屏幕之外


this.setData({

          centerLongitude: marker.longitude,

          centerLatitude: marker.latitude,

          markers: markers,

          mapScale: this.data.mapScale,

          layerShow: 'block'

        });


这样有问题


this.setData({

          centerLongitude: marker.longitude,

          centerLatitude: marker.latitude,

          markers: markers,

          layerShow: 'block'

        });


去掉设置scale的就没问题


问题好多啊!!!!!

回答关注问题邀请回答
收藏
登录 后发表内容