Skip to content

Commit

Permalink
docs: Minor tweaks + use roxygen Markdown + bring dev mod auto. (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy authored Apr 2, 2024
1 parent 4f9a2d8 commit ff7fae2
Show file tree
Hide file tree
Showing 27 changed files with 86 additions and 75 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,4 @@ Config/Needs/website: dplyr, geojsonio, ncdf4, tidyverse/tidytemplate
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
6 changes: 3 additions & 3 deletions R/layers.R
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ gridOptions <- function(
#' Remove one or more features from a map, identified by \code{layerId}; or,
#' clear all features of the given type or group.
#'
#' @note When used with a \code{\link{leaflet}}() map object, these functions
#' @note When used with a [leaflet][leaflet()] map object, these functions
#' don't actually remove the features from the map object, but simply add an
#' operation that will cause those features to be removed after they are
#' added. In other words, if you add a polygon \code{"foo"} and the call
Expand All @@ -692,8 +692,8 @@ gridOptions <- function(
#'
#' WMS tile layers are extensions of tile layers, so they can also be removed
#' or cleared via \code{removeTiles()} or \code{clearTiles()}.
#' @param map a map widget object, possibly created from \code{\link{leaflet}}()
#' but more likely from \code{\link{leafletProxy}}()
#' @param map a map widget object, possibly created from [leaflet()]
#' but more likely from [leafletProxy()]
#' @param layerId character vector; the layer id(s) of the item to remove
#' @return the new \code{map} object
#'
Expand Down
8 changes: 4 additions & 4 deletions R/legend.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
#' write your own function)
#' @param title the legend title
#' @param className extra CSS classes to append to the control, space separated
#' @param layerId the ID of the legend; subsequent calls to \code{addLegend}
#' or \code{addControl} with the same \code{layerId} will replace this
#' legend. The ID can also be used with \code{removeControl}.
#' @param layerId the ID of the legend; subsequent calls to \code{addLegend()}
#' or \code{addControl()} with the same \code{layerId} will replace this
#' legend. The ID can also be used with \code{removeControl()}.
#' @param group \code{group} name of a leaflet layer group.
#' Supplying this value will tie the legend to the leaflet layer group
#' with this name and will auto add/remove the legend as the
#' group is added/removed, for example via layerControl.
#' group is added/removed, for example via `layerControl()`.
#' You will need to set the \code{group} when you add a layer
#' (e.g. \code{\link{addPolygons}}) and supply the same name here.
#' @template data-getMapData
Expand Down
2 changes: 1 addition & 1 deletion R/mapPane.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' ordering. We recommend a \code{zIndex} value between 400 (the default
#' overlay pane) and 500 (the default shadow pane). You can then use this pane
#' to render overlays (points, lines, polygons) by setting the \code{pane}
#' argument in \code{leafletOptions}. This will give you control
#' argument in [leafletOptions()]. This will give you control
#' over the order of the layers, e.g. points always on top of polygons.
#' If two layers are provided to the same pane, overlay will be determined by
#' order of adding. See examples below.
Expand Down
4 changes: 2 additions & 2 deletions R/normalize.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ metaData.list <- function(obj) obj
#' Normalize data to a data frame or Spatial object.
#'
#' Given a data object and lng/lat arguments (which may be `NULL`)
#' [meaning infer from data], formula [which should be evaluated with respect to the data], or
#' vector data [which should be used as-is]) return a lng/lat data frame.
#' \[meaning infer from data\], formula \[which should be evaluated with respect to the data\], or
#' vector data \[which should be used as-is\]) return a lng/lat data frame.
#'
#' @param data map data
#' @param lng,lat longitude and latitude
Expand Down
3 changes: 2 additions & 1 deletion R/plugin-providers.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ providerTileOptions <- function(errorTileUrl = "", noWrap = FALSE,
#'
#' @name providers
#' @export providers
#' @rdname providers
#' @examples
#' providers
NULL
# Active binding added in zzz.R
"providers"
Expand Down
2 changes: 1 addition & 1 deletion man/addAwesomeMarkers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/addGraticule.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/addLegend.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/addMapPane.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/addMiniMap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/addRasterImage.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/addSimpleGraticule.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions man/colorNumeric.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/derivePoints.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/dispatch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/expandLimitsBbox.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/filterNULL.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/icons.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/leaflet.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/map-layers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/map-options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/providers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions man/remove.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/showGroup.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
url: https://rstudio.github.io/leaflet/

development:
mode: auto

template:
package: tidytemplate
assets: pkgdown/assets
Expand Down
3 changes: 2 additions & 1 deletion vignettes/articles/raster.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ library(leaflet)
```{r eval=FALSE}
library(raster)
library(leaflet)
r <- raster("https://rstudio.github.io/leaflet/nc/oisst-sst.nc")
# you can download by accessing https://rstudio.github.io/leaflet/nc/oisst-sst.nc
r <- raster("nc/oisst-sst.nc")
```

```{r}
Expand Down

0 comments on commit ff7fae2

Please sign in to comment.