r-spatial / mapview

Interactive viewing of spatial data in R
https://r-spatial.github.io/mapview/
GNU General Public License v3.0
510 stars 91 forks source link

popupImage has a scrollbar for large images #101

Closed adrfantini closed 6 years ago

adrfantini commented 6 years ago

I cannot find any mention of a scrollbar for large images in the popupImage manual. However, it is there! Is there any way to remove it and force the large images to be displayed without being cropped?

Reproducible example:

myLargeImage <- "https://upload.wikimedia.org/wikipedia/commons/4/4e/Pleiades_large.jpg"
library(sp)
data(meuse)
coordinates(meuse) = ~ x + y
proj4string(meuse) = CRS("+init=epsg:28992")
mapview(meuse, popup = popupImage(myLargeImage, width = 850, height = 603))

The image will be cut, but scrollable. What if I want it to be completely visible, with no scrollbar? This is on a 1920x180 monitor.

tim-salabim commented 6 years ago

@adrfantini this commit should address the sizing of the popup container. Can you please try and report back whether that solves your problem. I am no CSS expert, so it is mostly trial and error development.

adrfantini commented 6 years ago

I'm not sure if this is the right approach, but I reinstalled mapview from github and re-run my scripts, but the scrolling issue does not seem to be fixed. The same code as above still gives scroll. Maybe I should install mapview in some other way?

EDIT: sorry for the delay

tim-salabim commented 6 years ago

did you install from the develop branch?

devtools::install_github("r-spatial/mapview@develop")

adrfantini commented 6 years ago

You are right, sorry. I am not familiar with this. Works beautifully now!

2017-09-26 13:44 GMT+02:00 tim-salabim notifications@github.com:

did you install from the develop branch?

devtools::install_github("r-spatial/mapview@develop")

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/r-spatial/mapview/issues/101#issuecomment-332172823, or mute the thread https://github.com/notifications/unsubscribe-auth/AMO2HSILMKP9yGx7dRfbAZ68i01T61ZQks5smOOggaJpZM4PghRC .

tim-salabim commented 6 years ago

Hopefully I will find some time soon to push the recent updates to CRAN