waynegm / imgViewer2

Extensible and responsive jQuery plugin to zoom and pan images based on the Leaflet mapping library
MIT License
60 stars 34 forks source link

Markers are not placed at the specific x,y #3

Closed softsan closed 7 years ago

softsan commented 7 years ago

Hi,

I tried to use the plugin. I have image which is a custom drawn image and i upload points (X,Y) and photos from my mobile app. When i render that custom drawn map on web portal using your plugin and specify x and y then those are different that mobile app.

I open that custom drawn map in photoshop and see that the points (x,y) coming from mobile app is correct and relative to exact position on the map. but using your control its been render at different place.

Any thoughts on this? Thanks

waynegm commented 7 years ago

For the plugin the x and y must be in relative image coordinates. If the natural image width is 1000 and the x pixel location is 200 then the relative x coordinate will be 0.2 (200/1000). Are you giving the plugin note locations in relative image coordinates?

softsan commented 7 years ago

Great! That worked.. Thanks.