Hi,

I am using the following code to create marker and infowindow in
google map. But the data is overflowing from the infowindow. Can
someone please tell me how can I change the size of infowindow so that
all the information can fit in.

        // Create a base icon
        var baseIcon = new GIcon();
        baseIcon.shadow = "http://www.google.com/mapfiles/
shadow50.png";
        baseIcon.iconSize = new GSize(20, 34);
        baseIcon.shadowSize = new GSize(37, 34);
        baseIcon.iconAnchor = new GPoint(9, 34);
        baseIcon.infoWindowAnchor = new GPoint(9, 2);
        baseIcon.infoShadowAnchor = new GPoint(18, 25);

        // Creates a marker whose info window displays given
information
        function createMarker(point, name, location, phonenum,
address, latitude, longitude, urladdress, locationNumber) {
          var icon = new GIcon(baseIcon);
          icon.image = "images/markers" + locationNumber + ".png";
          var marker = new GMarker(point, icon);
          GEvent.addListener(marker, "mouseover", function() {
            marker.openInfoWindowHtml('<img src="test.gif" width=162
height=50>'+ '<br>' +'<a target="_blank" href="http://maps.google.com/
maps?f=q&hl=en&q=from:'+homeSpatialInfo.fromAddress+'+to:'+latitude
+','+longitude+'('+urladdress+')'+'">Directions</a>'+ '<br>' +
'<br>'+name + '<br>'+ location+ '<br>' +address + '<br>');
          });
          return marker;
        }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to