You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#plot Korea with ggplot2.
library(ggplot2)
map <- openmap(c(43.46886761482925,119.94873046875),
c(33.22949814144951,133.9892578125),
minNumTiles=4, type = "osm")
autoplot(map)
The error message above disappeared, but I got another error message:
Error in `autoplot()`:
! Objects of class <OpenStreetMap> are not supported by autoplot.
ℹ have you loaded the required package?
Run `rlang::last_trace()` to see where the error occurred.
There is no error when I run plot(map). The error occurred only in running autoplot(map).
I have just installed OpenStreetMap package. I tried to run this:
openmap(c(-8.17201, 113.65975), c(-8.1907, 113.6958))
and I got this error message:
Error in if (substring(type, 1L, 4L) == "http") type else match.arg(type) : the condition has length > 1
I then tried to run the code in the Example
Surprisingly, I got the same error message.
I found a solution, which is to specify
type = "osm"
, from here: https://stackoverflow.com/questions/76489384/error-when-using-openmap-function-openstreetmap-package-in-rSo I run:
The error message above disappeared, but I got another error message:
There is no error when I run
plot(map)
. The error occurred only in runningautoplot(map)
.Here is my session info:
The text was updated successfully, but these errors were encountered: