Hi All,
I have the following javascript function which shows a hidden window i
create at startup of page on the map . the functions displayes it when
i click on it. However if i drag the map the window shows in different
positions than the center of the map. How can i flush the previos cc.x
and cc.y from memory which seems to be causing the problem. Thanks for
your help i appreciate it
function opencontactusfile(p){
document.getElementById("mapwindow").innerHTML = '';
var thephpfile = phpfilename;
var cc = map.fromLatLngToDivPixel(map.getCenter());
var left = cc.x - 150;
var right = cc.y - 180;
document.getElementById("mapwindow").style.visibility = "visible";
var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize
(left,right));
pos.apply(document.getElementById("mapwindow"));
document.getElementById("map").appendChild(document.getElementById
("mapwindow"));
document.getElementById("mapwindow").innerHTML = 'hello';
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---