stuartmatthews / leaflet-geotiff

Leaflet plugin for displaying geoTIFF raster data
MIT License
174 stars 76 forks source link

"getValueAtLatLng" works at out of the workspace area. #5

Open s9eenk opened 6 years ago

s9eenk commented 6 years ago

Hi Stuart, Wondering, how come the click returns a value when clicked out of the workspace area (out of the bounding extents of raster map) . I mean the 'click' returns a value when it's clicked on Google map also. Somewhat confused... Please help me in this regard.

stuartmatthews commented 6 years ago

It looks like this is caused by lack of range checking when calculating the row and column of the clicked point then calculating the data index as y*this.raster.width+x.

This is a bug to be fixed. It should not affect the values retrieved when clicking inside the raster.

rohith231 commented 3 years ago

How can i change the lat lng to different location it is inbuilt location in austraila