2
我想將我的地圖放在自定義信息框的中心。相反,我正在轉向一個完全不同的地方,遠離我的地圖標記。這裏是我的代碼:Google.maps panTo
var projection = this.getProjection(),
centerX = point.x - (125)/2,
centerY = point.y - (120)/2,
centerPoint = new google.maps.Point(centerX, centerY);
var latLngOfBoxTop = projection.fromContainerPixelToLatLng(centerPoint);
this.map.panTo(latLngOfBoxTop);
什麼是更好的方法來平移到地圖上的一個點?