anthonynorth / snapbox

Static mapbox basemap for ggplot2.
MIT License
41 stars 4 forks source link

Non-finite location and/or size for viewport #9

Open robsalasco opened 4 years ago

robsalasco commented 4 years ago

Hi! I'm running snapbox under debian buster using a rmarkdown file and render() command. I don't have issues on macos but adding the layer to ggspatial cause the infamous "non-finite location and/or size for viewport" error.

Hope you can find a solution, thank you guys!

layer_mapbox(st_bbox(isocrona), 
             mapbox_api_access_token = "",
             map_style = mapbox_light(), 
             retina = F, scale_ratio = 0.5) + 
Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
  non-finite location and/or size for viewport
robsalasco commented 4 years ago

update: I tried to build under R 4.0.2 using the rocker geospatial image and it gets stuck trying to render the map :/

MilesMcBain commented 4 years ago

I haven't been able to reproduce this on Ubuntu 18.04 :grimacing:

MilesMcBain commented 4 years ago

@robsalasco since you say "infamous", do you have a link to some info about this error in mind?

robsalasco commented 4 years ago

@MilesMcBain yeah it's very common and it have multiple reasons . Are you using a docker image? I'm trying to use the library on rocker geospatial I tried 3.6.1 and 4.0.2. In the first the non-finite error appeared and in the 4.0.2 version snapbox doesn't work because it gets stuck doing something. I use the library inside a rmarkdown file ;).