Getting pixel coordinates of an image overlay using leaflet map library on click (right click)
问题 I'm trying to get the pixel coordinates of an image overlay on click (right click/contextmenu) using the leaflet map library. Essentially when a user clicks on the image, I need to find the x,y or width,height of where the user clicked on the image. Currently this is what I have. // Using leaflet.js to pan and zoom a big image. // See also: http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html // create the slippy map var map = L.map('image-map', { minZoom: 1, maxZoom: 4, center: [0, 0