Sunday, August 18, 2013

How can I suppress Google's API warning when using ggmap with knitr?

How can I suppress Google's API warning when using ggmap with knitr?

How can I suppress Google's messages when using ggmap with a knitr .Rnw
file? Here is code to generate a pdf from .Rnw:
\documentclass{article}
\begin{document}
<<>>=
library(ggmap)
qmap("empire state building", zoom = 15, messaging = FALSE, source =
"google")
@
\end{document}
In the resulting .pdf, the following poorly formatted messages appear:
Map from URL :
http://maps.googleapis.com/maps/api/staticmap?center=empire+state+building&zoom=15&size=%20640x640&scale=%202&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=empire+state+building&sensor=false
Google Maps API Terms of Service : http://developers.google.com/maps/terms
Can this be suppressed (was hoping messaging = FALSE would do this) or at
least formatted so the warnings don't run off the page? Thank you.

No comments:

Post a Comment