Error when trying to use ggmap::get_map ( JPEG decompression error: Not a JPEG file: starts with 0x89 0x50) [closed]
Asked Answered
B

0

6

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?

Bourassa answered 9/12, 2016 at 18:36 Comment(4)
I get no error. I have version 2.7 installed, and since the repo version is behind this, I suspect it was because someone else reported an error with the earlier version and it was fixed. Probably available at github.Carlina
#40643350Carlina
A JPEG stream starts with FFD8, so somewhere it is getting something else.Redmond
I got the answer. Yes the version I had installed was behind the change in the stamen. Thanks, for the answer.Bourassa

© 2022 - 2024 — McMap. All rights reserved.