Coordinates in 3D

If the map is on a flat plane you can use this snippet to find where the mouse ray and plane intersect:

If the map is on a 2d gui element (or something alike) you just need the mouse pointer position in the window and where the frame showing the map is.

If the map is some sort of 3D object then you can either do typical collision detection or some sort of magic with a pixel sized buffer under the cursor.