This is the code i was using.
GEvent.addListener(marker, "click", function()
{
document.getElementById("mapwindow").innerHTML = '';
document.getElementById("adminwindow").innerHTML = '';
marker.openInfoWindowTabsHtml([new GInfoWindowTab
("Overview",html), new GInfoWindowTab("Video",youtubevideoformat)],
{suppressMapPan:true});
map.savePosition();
function subGPoints(a,b)
{ //returns the distance in pixels between point a and b
return new GPoint(a.x-b.x, a.y-b.y);
}
//Pixel distance to the center of the map
var CDivPixel = map.fromLatLngToDivPixel(map.getCenter());
//Pixel distance from the marker point
var pointDivPixel = map.fromLatLngToDivPixel(point);
//Difference between the above mentioned distances
var fromCenter = subGPoints(pointDivPixel, CDivPixel);
//Pan to the corrected location (the -40 and +215 sizes are the
distances from my marker to the center of the infowindow
map.panBy(new GSize(-fromCenter.x+6,-fromCenter.y+225))
}
);
On May 14, 1:52 pm, Ivan <[email protected]> wrote:
> Hi guys,
>
> Seems like all of a sudden my info windows have stopped spanning into
> center view.
> These were working before.
>
> See link here :http://www.belizemapia.com/index4.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---