diff --git a/.Rbuildignore b/.Rbuildignore index 2abcd6d..91ef7e3 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,4 +1,3 @@ -^\.travis\.yml$ ^CODE_OF_CONDUCT\.md$ ^README\.Rmd$ ^.*\.Rproj$ @@ -8,4 +7,5 @@ ^docs$ ^pkgdown$ ^private$ -^figures$ +^man/figures$ +^README\.md$ diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index e23739c..562fe0f 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,12 +1,13 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: branches: [main, master] pull_request: - branches: [main, master] -name: R-CMD-check +name: R-CMD-check.yaml + +permissions: read-all jobs: R-CMD-check: @@ -18,7 +19,7 @@ jobs: fail-fast: false matrix: config: - - {os: macOS-latest, r: 'release'} + - {os: macos-latest, r: 'release'} - {os: windows-latest, r: 'release'} - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - {os: ubuntu-latest, r: 'release'} @@ -29,7 +30,7 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -41,6 +42,10 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: rcmdcheck + extra-packages: any::rcmdcheck + needs: check - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3ee7fdf..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r -language: r -sudo: required -dist: xenial -cache: packages -latex: true - -addons: - apt: - sources: - - sourceline: 'ppa:ubuntugis/ubuntugis-unstable' - packages: - - gdal-bin - - libproj-dev - - libgeos-dev - - libgdal-dev - - libudunits2-dev - - netcdf-bin # for stars netcdf dep - -r: - - release - - devel - - oldrel diff --git a/DESCRIPTION b/DESCRIPTION index b635e6f..56db987 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -91,5 +91,4 @@ Suggests: terra, tools Encoding: UTF-8 -LazyData: false RoxygenNote: 7.3.2 diff --git a/R/homebutton.R b/R/homebutton.R index 744b105..6c3ac32 100644 --- a/R/homebutton.R +++ b/R/homebutton.R @@ -40,6 +40,8 @@ #' @export addHomeButton #' @name addHomeButton #' @rdname addHomeButton +#' @param css,hover_css list of valid CSS key-value pairs. See e.g. +#' \url{https://www.w3schools.com/cssref/index.php} for possible values. #' @aliases addHomeButton addHomeButton <- function(map, ext, group = "layer", position = 'bottomright', add = TRUE, diff --git a/R/keys.R b/R/keys.R index 868a6e0..ad4df06 100644 --- a/R/keys.R +++ b/R/keys.R @@ -4,7 +4,7 @@ #' Add JavaScript functioality to enable copying of the current view bouding box #' to the clipboard. The \code{copy.btn} argument expects a valid keycode #' \code{event.code} such as "KeyE" (the default). -#' Use \url{https://www.toptal.com/developers/keycode/} to find the +#' Use \url{https://www.toptal.com/developers/keycode} to find the #' approprate codes for your keyboard. #' #' @param map a mapview or leaflet object. diff --git a/README.Rmd b/README.Rmd index d801a33..23b5ee7 100644 --- a/README.Rmd +++ b/README.Rmd @@ -17,11 +17,11 @@ knitr::opts_chunk$set( # leafem - leaflet extensions for mapview -[![R-CMD-check](https://github.com/r-spatial/leafem/workflows/R-CMD-check/badge.svg)](https://github.com/r-spatial/leafem/actions) +[![R-CMD-check](https://github.com/r-spatial/leafem/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-spatial/leafem/actions/workflows/R-CMD-check.yaml) [![cran checks](https://badges.cranchecks.info/worst/leafem.svg)](https://cran.r-project.org/web/checks/check_results_leafem.html) -![monthly](http://cranlogs.r-pkg.org/badges/leafem) -![total](http://cranlogs.r-pkg.org/badges/grand-total/leafem) -[![CRAN](http://www.r-pkg.org/badges/version/leafem?color=009999)](https://cran.r-project.org/package=leafem) +![monthly](https://cranlogs.r-pkg.org/badges/leafem) +![total](https://cranlogs.r-pkg.org/badges/grand-total/leafem) +[![CRAN](https://www.r-pkg.org/badges/version/leafem?color=009999)](https://cran.r-project.org/package=leafem) `leafem` provides extensions for package `leaflet` many of which are used by package `mapview`. The intention of this package is to enhance `leaflet` functionality to provide a more GIS-like feeling when plotting spatial data interactively. @@ -44,7 +44,7 @@ library(leaflet) leaflet() %>% addProviderTiles("OpenStreetMap") %>% addFeatures(data = breweries91) ``` -![](figures/README-features.png) +![](man/figures/README-features.png) #### addMouseCoordinates @@ -54,7 +54,7 @@ leaflet() %>% addMouseCoordinates() ``` -![](figures/README-garnish.png) +![](man/figures/README-garnish.png) #### garnishMap @@ -65,7 +65,7 @@ m <- leaflet() %>% addProviderTiles("OpenStreetMap") garnishMap(m, addMouseCoordinates) ``` -![](figures/README-garnish.png) +![](man/figures/README-garnish.png) #### addHomeButton @@ -80,7 +80,7 @@ m <- leaflet() %>% m ``` -![](figures/README-home.png) +![](man/figures/README-home.png) #### addImageQuery @@ -97,7 +97,7 @@ leaflet() %>% addLayersControl(overlayGroups = "poppendorf") ``` -![](figures/README-query.png) +![](man/figures/README-query.png) #### addLogo @@ -107,7 +107,7 @@ img <- "https://www.r-project.org/logo/Rlogo.svg" leaflet() %>% addTiles() %>% addLogo(img, url = "https://www.r-project.org/logo/") ``` -![](figures/README-logo.png) +![](man/figures/README-logo.png) ### Code of Conduct diff --git a/README.md b/README.md index 92a6a58..2e114ee 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,12 @@ -[![R-CMD-check](https://github.com/r-spatial/leafem/workflows/R-CMD-check/badge.svg)](https://github.com/r-spatial/leafem/actions) +[![R-CMD-check](https://github.com/r-spatial/leafem/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-spatial/leafem/actions/workflows/R-CMD-check.yaml) [![cran checks](https://badges.cranchecks.info/worst/leafem.svg)](https://cran.r-project.org/web/checks/check_results_leafem.html) -![monthly](http://cranlogs.r-pkg.org/badges/leafem) -![total](http://cranlogs.r-pkg.org/badges/grand-total/leafem) -[![CRAN](http://www.r-pkg.org/badges/version/leafem?color=009999)](https://cran.r-project.org/package=leafem) +![monthly](https://cranlogs.r-pkg.org/badges/leafem) +![total](https://cranlogs.r-pkg.org/badges/grand-total/leafem) +[![CRAN](https://www.r-pkg.org/badges/version/leafem?color=009999)](https://cran.r-project.org/package=leafem) `leafem` provides extensions for package `leaflet` many of which are @@ -37,7 +37,7 @@ library(leaflet) leaflet() %>% addProviderTiles("OpenStreetMap") %>% addFeatures(data = breweries91) ``` -![](figures/README-features.png) +![](man/figures/README-features.png) #### addMouseCoordinates @@ -47,7 +47,7 @@ leaflet() %>% addMouseCoordinates() ``` -![](figures/README-garnish.png) +![](man/figures/README-garnish.png) #### garnishMap @@ -58,7 +58,7 @@ m <- leaflet() %>% addProviderTiles("OpenStreetMap") garnishMap(m, addMouseCoordinates) ``` -![](figures/README-garnish.png) +![](man/figures/README-garnish.png) #### addHomeButton @@ -73,7 +73,7 @@ m <- leaflet() %>% m ``` -![](figures/README-home.png) +![](man/figures/README-home.png) #### addImageQuery @@ -90,7 +90,7 @@ leaflet() %>% addLayersControl(overlayGroups = "poppendorf") ``` -![](figures/README-query.png) +![](man/figures/README-query.png) #### addLogo @@ -100,7 +100,7 @@ img <- "https://www.r-project.org/logo/Rlogo.svg" leaflet() %>% addTiles() %>% addLogo(img, url = "https://www.r-project.org/logo/") ``` -![](figures/README-logo.png) +![](man/figures/README-logo.png) ### Code of Conduct diff --git a/man/addCopyExtent.Rd b/man/addCopyExtent.Rd index 4000465..f200e9c 100644 --- a/man/addCopyExtent.Rd +++ b/man/addCopyExtent.Rd @@ -15,7 +15,7 @@ addCopyExtent(map, event.code = "KeyE") Add JavaScript functioality to enable copying of the current view bouding box to the clipboard. The \code{copy.btn} argument expects a valid keycode \code{event.code} such as "KeyE" (the default). -Use \url{https://www.toptal.com/developers/keycode/} to find the +Use \url{https://www.toptal.com/developers/keycode} to find the approprate codes for your keyboard. } \examples{ diff --git a/man/addHomeButton.Rd b/man/addHomeButton.Rd index 5647063..5cb4ed3 100644 --- a/man/addHomeButton.Rd +++ b/man/addHomeButton.Rd @@ -29,6 +29,9 @@ string)} 'bottomleft', 'bottomright'). Defaults to 'bottomright'.} \item{add}{logical. Whether to add the button to the map (mainly for internal use).} + +\item{css, hover_css}{list of valid CSS key-value pairs. See e.g. +\url{https://www.w3schools.com/cssref/index.php} for possible values.} } \description{ This function adds a button to the map that enables zooming to a diff --git a/figures/README-features.png b/man/figures/README-features.png similarity index 100% rename from figures/README-features.png rename to man/figures/README-features.png diff --git a/figures/README-garnish.png b/man/figures/README-garnish.png similarity index 100% rename from figures/README-garnish.png rename to man/figures/README-garnish.png diff --git a/figures/README-home.png b/man/figures/README-home.png similarity index 100% rename from figures/README-home.png rename to man/figures/README-home.png diff --git a/figures/README-logo.png b/man/figures/README-logo.png similarity index 100% rename from figures/README-logo.png rename to man/figures/README-logo.png diff --git a/figures/README-query.png b/man/figures/README-query.png similarity index 100% rename from figures/README-query.png rename to man/figures/README-query.png