Sep
23
Written by:
Soul Solutions
Saturday, 23 September 2006
For some reason the built in gettop and getleft methods from Virtual earth don't work consistantly across all interfaces. Try this more generic function instead.
function SetMapOffsets(obj) {
if (obj.offsetParent) {
mapleft = obj.offsetLeft
maptop = obj.offsetTop
while (obj = obj.offsetParent) {
mapleft += obj.offsetLeft
maptop += obj.offsetTop
}
}
}
Tags: