Skip to content

Commit

Permalink
3.0.2: allow suppression of package startup messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dkahle committed Mar 13, 2023
1 parent c5d234c commit ac829ba
Show file tree
Hide file tree
Showing 11 changed files with 7,352 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: ggmap
Version: 3.0.1.900
Version: 3.0.2
Title: Spatial Visualization with ggplot2
Description: A collection of functions to visualize spatial data and models
on top of static maps from various online sources (e.g Google Maps and Stamen
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# ggmap 3.0.2

## Changes

* Startup messages can now be suppressed

# ggmap 3.0.1

## New features
Expand Down
20 changes: 18 additions & 2 deletions R/attach.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
.onAttach <- function(...) {

cli::cli_alert_info("Google's Terms of Service: {.url https://mapsplatform.google.com}")
cli::cli_alert_info("Please cite {.pkg ggmap} if you use it! Use {.code citation(\"ggmap\")} for details.")
tos <- paste0(
cli::col_green(cli::symbol$info),
" ",
"Google's Terms of Service: ",
cli::col_blue(cli::style_italic(
cli::style_hyperlink("<https://mapsplatform.google.com>", "https://mapsplatform.google.com")
))
)
cite <- paste0(
cli::col_green(cli::symbol$info),
" ",
"Please cite ", cli::col_blue("ggmap"), " if you use it! Use `citation(\"ggmap\")` for details."
)

rlang::inform(
paste0(tos, "\n", cite),
class = "packageStartupMessage"
)

bootstrap_ggmap()

Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ knitr::opts_chunk$set(
collapse = TRUE, cache = FALSE,
comment = "# ",
fig.path = "tools/README-",
dpi = 300 # 60 on CRAN
dpi = 60 # 60 on CRAN
)
```

Expand Down
7,333 changes: 7,326 additions & 7 deletions README.md

Large diffs are not rendered by default.

Binary file modified tools/README-faceting-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tools/README-google_maps-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tools/README-maptypes-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tools/README-qmplot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tools/README-route_trek-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tools/README-styling-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ac829ba

Please sign in to comment.