Error trying to use ggmap :: get_map (JPEG decompression error: not JPEG file: starts from 0x89 0x50)

I am trying to configure a map from ggmap. I borrowed this line from another script, but it does not work for me. I want to indicate the border 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 US border should be displayed on the map, but when you try to start it, it produces the following error:

 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 comments on fixing the problem?

+5
source share

Source: https://habr.com/ru/post/1261063/


All Articles