1
나는 이것에 잠시 동안 머물 렀기 때문에 내 요구 사항을 단순화했습니다. 마커를 클릭하면 정보 창이 열리 며, 사용자가 아이콘 을 확대하면 마커가 맵의 중앙에 위치하게됩니다. 이 작동하지 않습니다하지만 난 가까운 것 같아요 :Zoom_changed - 센터
function bindInfoWindow(marker, map, infoWindow, html) {
google.maps.event.addListener(marker, 'click', function() {
infoWindow.setContent(html);
infoWindow.open(map, marker);
});
google.maps.event.addListener(map, 'zoom_changed', function() {
infoWindow.setCenter(infoWindow.getCenter());
});
}
http://www.hostelbars.com/map_test_v3_1.html
답장을 보내 주셔서 감사합니다. 이것은 열려있는 정보창을 확대/축소하여지도의 중심으로 이동하지 않는 것처럼 내가하고 싶은 것을 달성하지 못합니다. 너 더 멀리 도울 수 있니? 덕분에 – Brendon
'google.maps.event.addListener (map, 'zoom_changed', function() { infoWindow.setCenter (infoWindow.getCenter()), }), ' –
위대한 - 감사합니다,이 지금 작동합니다. – Brendon