I keep getting this error Error in readPNG(destfile) : libpng error: PLTE: CRC error with the following code:
map <- get_map(location='Auckland', source="stamen", maptype="toner", zoom=11)
ggmap(map)
This does works however:
map <- get_map(location='Auckland', source="stamen", maptype="toner", zoom=13)
ggmap(map)
Any ideas? I get the feeling that this may be an issue with Stamen maps rather than ggmap. If so, I will take it to them.
I can get the two maps, but not consistently. If I get an error, I run the code a second or a third time to get the maps drawn. I don’t think it’s got anything to do with
zoomlevels. Nothing systematic, but I get the same error message with other zoom levels; even the same zoom level in the two maps.The error message I get is:
The file,
ggmapTemp.png, is generated by ggmap in the working directory, but I don’t know how it is involved.I ran the following code to draw the two maps:
I’m using R version 2.15.0, ggplot2 version 0.9.1, and ggmap version 2.1