I am trying to set up a map from ggmap.I have borrowed this line from another script but it is not working for me. I want to specify the boundary of the map.
myLocation <- c( -133.50734, 26.07781, -60.49268, 47.77387)
myMap <- ggmap::get_map(location=myLocation, source="stamen", maptype="terrain", crop=TRUE)
The map should show the US boundary, but it throws the following error when trying to run it:
Map from URL : http://tile.stamen.com/terrain/5/4/11.jpg
Error in readJPEG(tmp) :
JPEG decompression error: Not a JPEG file: starts with 0x89 0x50
Any comment on how to fix the issue?