I was trying to use the ggmap qmap function (http://www.inside-r.org/packages/cran/ggmap/docs/qmap)
qmap(location = 'baylor university', zoom = 14, maptype = 'watercolor', source = 'stamen')
And got the following error:
qmap(location = 'baylor university', zoom = 14, maptype = 'watercolor', source = 'stamen') Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=baylor+university&zoom=14&size=%20640x640&maptype=terrain&sensor=false Google Maps API Terms of Service : http://developers.google.com/maps/terms Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=baylor+university&sensor=false Google Maps API Terms of Service : http://developers.google.com/maps/terms Error in readPNG(destfile) : file is not in PNG format
qmap tries to read the files as .pngs, but stamen sends .jpg format files, which the internal function in qmap is not equipped to handle. Hopefully a new version will be out soon.
Until then, there is a manual workaround, detailed at the link below, where you essentially create your own version of the R source files used by qmap, replacing png with jpg in the code. It worked for me:
https://stackoverflow.com/a/24301510/3652621
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With