rrgooglemaps

PlotOnStaticMap (R package RgoogleMaps) doesn't work with old version


m trying to use this code in R, with package RgoogleMaps

R Version: 2.14.2

RgoogleMaps version: 1.1.9.15

I need to use these old versions, here's the code (works with newest versions)

PlotOnStaticMap(Map,lon=x,lat=y, FUN = points, pch=16, col=Colors)

but with these old versions, I find these error message:

List of 8
 $ lat.center: num 45.6
 $ lon.center: num 12.4
 $ zoom      : num 9
 $ myTile    : 'nativeRaster' int [1:640, 1:640] -1906967 -1906967 -1906967 -1446673 -1183245 -1183245 -1183245 -1183245 -1445905 -2235674 ...
  ..- attr(*, "channels")= int 4
 $ BBOX      :List of 2
  ..$ ll: num [1, 1:2] 45 11.5
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr "Y"
  .. .. ..$ : chr [1:2] "lat" "lon"
  ..$ ur: num [1, 1:2] 46.2 13.3
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr "Y"
  .. .. ..$ : chr [1:2] "lat" "lon"
 $ url       : chr "google"
 $ size      : int [1:2] 640 640
 $ SCALE     : num 1
NULL
[1] -148.7783  210.1525
[1] -131.7210  127.5206
Errore in plot.xy(xy.coords(x, y), type = type, ...) : 
  plot.new hasn't been called yet

What's the problem?


Solution

  • Error was in Map. It was downloaded with newest version of the package, and oldest version didn't recognized it