Question

If i put map.setCenter(marker.getPosition()); in OnClick Marker then the Marker Moves to Center Position of the Map Window.Which mean the Function get Marker Position and set it as center of the Map so the Marker Became Center Position of the Window.

Now i want this. map.SetCenter(top, center); So that the marker will be in Top Center of the Map Window. Why i need this because When i click Marker the InfoBox opens downside of the maker and Half of the Info Box hide.

Please Give a Solution to solve this issue.

I am using this Info Box http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/examples.html

Was it helpful?

Solution

You might have disabled autopan for infobox..

remove disableAutoPan : true from your infobox properties...

infoBoxCluster = new InfoBox({
    content : yourContent,
    disableAutoPan : true,   // remove this line
    zIndex : 10000,
    closeBoxURL : '',
    pixelOffset : new google.maps.Size(42, -28)
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top