Two people doing their own thing.

Microsoft Certified Partner Soul Solutions
Sep 23

Written by: Soul Solutions
Saturday, 23 September 2006

johnWeeGo.jpgFor 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:

Your name:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment    Cancel