2013-05-22 2 views
1

정보 창을 만들어 내 구글 맵 코드의 부분은 이것이다 :googlemaps에서 정보창의 최대 너비는?

    google.maps.event.addListener(marker, 'click', function() { 
        infowindow.setContent(this.html); 
        infowindow.open(map, this); 
        }); 

내가 정보창에 250 픽셀의 최대 폭을 설정해야하지만 난 그게 작동시킬 수 캔트.

    google.maps.event.addListener(marker, 'click', function() { 
        infowindow.setContent(this.html); 
        infowindow.maxWidth(250); 
        infowindow.open(map, this); 
        }); 
+0

다음에 구문 오류가 있습니다 – duncan

답변

2

작업 : 정보창 클래스는 어떤`maxWidth` 방법이 없어

    google.maps.event.addListener(marker, 'click', function() { 
        // where I have added .html to the marker object. 
        infowindow.setContent(this.html); 
        infowindow.setOptions({maxWidth:250}); 
        infowindow.open(map, this); 
        }); 
관련 문제