Hi there,
I'm pretty new to RStudio community and RStudio Cloud, so first of all...Congrats and many thanks for this platform is really awesome!
I'm running a basic spatial plot using the function openmap()
from the OpenStreetMap
package. When asking for downloading data with the aforementioned function, the following error appears:
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
I've tried to follow the examples provided in the help menu of the openmap()
function and the same messages appears.
The (example) code provided by the help menu of the openmap()
function is:
## Not run:
#show some of the maps available
nm <- c("osm", "maptoolkit-topo", "bing", "stamen-toner",
"stamen-watercolor", "esri", "esri-topo",
"nps", "apple-iphoto", "skobbler")
par(mfrow=c(3,4))
#Korea
for(i in 1:length(nm)){
map <- openmap(c(43.46886761482925,119.94873046875),
c(33.22949814144951,133.9892578125),
minNumTiles=3,type=nm[i])
plot(map)
}
And my own code is:
Galapagos <- openmap(upperLeft = c(-0.18, -91) , lowerRight = c(-1.0, -89.8),
zoom = 10, type = "bing")
I would like to know if the problem arises because of some rJava configuration in my laptop and/or in the RStudio Cloud....THANKS!
sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.5 LTS
Matrix products: default
BLAS: /usr/lib/atlas-base/atlas/libblas.so.3.0
LAPACK: /usr/lib/atlas-base/atlas/liblapack.so.3.0
locale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
[4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
[7] LC_PAPER=C.UTF-8 LC_NAME=C.UTF-8 LC_ADDRESS=C.UTF-8
[10] LC_TELEPHONE=C.UTF-8 LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] maps_3.3.0 ggplot2_3.1.1 OpenStreetMap_0.3.3
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 rstudioapi_0.10 raster_2.8-19 magrittr_1.5
[5] tidyselect_0.2.5 munsell_0.5.0 colorspace_1.4-1 lattice_0.20-38
[9] R6_2.4.0 rlang_0.3.4 plyr_1.8.4 dplyr_0.8.0.1
[13] tools_3.6.0 rgdal_1.4-3 grid_3.6.0 gtable_0.3.0
[17] withr_2.1.2 digest_0.6.18 lazyeval_0.2.2 assertthat_0.2.1
[21] tibble_2.1.1 crayon_1.3.4 rJava_0.9-11 purrr_0.3.2
[25] codetools_0.2-16 glue_1.3.1 labeling_0.3 sp_1.3-1
[29] compiler_3.6.0 pillar_1.3.1 scales_1.0.0 pkgconfig_2.0.2