I have an html image map and I want to get the coordinates when a user clicks on the map.
Is there a way to retrieve the map coordinates with a mouse click on the map?
I have an html image map and I want to get the coordinates when a user clicks on the map.
Is there a way to retrieve the map coordinates with a mouse click on the map?
Yes there is. But using only javascript could be very complex.
If you can you need to implement jquery and then check this link.
If you are talking about a real map image (like google maps or something) once you get the mouse coordinates simply multiply by the map scale. :)
You could use the JQuery library and do the following:
$(".link").click(function(e){
e.pageX;
e.pageY;
}