ThinkGeo.com    |     Documentation    |     Premium Support

Screen coordinates on mousemove

Hi,

I am using thinkgeo map suite web edition. I am facing a problem in getting screen coordinates on mousemove.

Actually there is no mouse move event for Map. so I used onmousemove event of body tag like this.
body onmousemove=“wfmapmousemove(event)”

my code is follows in javascript.

   function wfmapmousemove(e) {
        var x = e.clientX;
        var y = e.clientY;
        var coor = "Coordinates: (" + x + "," + y + ")";
        alert(coor);
    }  

I am getting screen coordinates outside the Map element. But when I mouse over on map, I am not getting and event also not firing. Can u please check this and help on this.

Thanks
Ashok

Hi Ashok,

Please refer this topic: Attach Javascript function to marker click event

Wish that’s helpful.

Regards,

Ethan