Possible Duplicate:
Clustering Google Maps API V3
Could someone plz tell me how do I obtain the pixel coordinates of a marker in Google maps API V3? Thanks in advance.
This is one section of the code I'm using:
var x=0, y=0;
function getLeft(obj)
{
if ('string' == typeof obj) obj = document.getElementById(obj);
while (obj != null) { x += obj.offsetLeft; obj = obj.offsetParent; }
//return x;
}
function getTop(obj)
{
if ('string' == typeof obj) obj = document.getElementById(obj);
while (obj != null) { y += obj.offsetTop; obj = obj.offsetParent; }
//return y;
}
As a result of this, the div is getting displayed on the top left corner. How do I display it next to the specific markers?