MousePosition Control


Use the MousePosition Control to display the coordinates of the cursor inside or outside the map div.

This example also shows how to use the the "prefix", "separator" and "numDigits" options to customize the output of the MousePosition-Control. By also setting the "emptyString"-property, the contents of the controls element are resetted to the given string when the mouse isn't above the map.

Moving your mouse to the upper left corner of this map should return 'x=0,y=0' (pixel coordinates) -- in the past, it didn't in IE. If it returns 'x=2,y=2', consider it a bug, and report it.