Tuesday, August 6, 2013

Get Google Maps v3 to resize height of InfoWindow

Js
var infowindow = new google.maps.InfoWindow({
                                 content: lng,
                                 maxWidth: 200
                            });

google.maps.event.addListener(marker, 'click', function() {       
        var $content = $('<div class="infobox">').html("content here");
        infowindow.setContent($content.get(0));
        infowindow.open(map, marker);
});

CSS

.infobox{
    padding-bottom: 30px;
}

No comments:

Post a Comment