How to set offset on google maps infobox

775 Views Asked by At

I have a variable width infobox (http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/examples.html). How can I set the offset so that it displays over the marker each time?

infobox = new InfoBox({
     alignBottom: true,
     content: document.getElementById("infobox"),
     disableAutoPan: false,
     maxWidth: "",
     pixelOffset: ?????????
     zIndex: null,
     boxStyle: {
        background: "url('http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/examples/tipbox.gif') no-repeat",
        opacity: 1,

    },
    closeBoxMargin: "12px 4px 2px 2px",
    closeBoxURL: "http://www.google.com/intl/en_us/mapfiles/close.gif",
    infoBoxClearance: new google.maps.Size(1, 1)
});
1

There are 1 best solutions below

0
On

It is position of the infoBox with respect to the marker.

It is set at 140px in right by default, so set the values for x and y respectively and the box will appear there everytime.