Skip to content

Commit

Permalink
Add example docs r-spatial#34
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Jun 11, 2022
1 parent 6544545 commit 57c2d0a
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ Suggests:
stars
Encoding: UTF-8
LazyData: false
RoxygenNote: 7.1.2
RoxygenNote: 7.2.0
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export(addImageQuery)
export(addLocalFile)
export(addLogo)
export(addMouseCoordinates)
export(addPMTiles)
export(addRasterRGB)
export(addReactiveFeatures)
export(addStarsImage)
Expand Down
20 changes: 20 additions & 0 deletions R/pmtiles.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
#' Add vector tiles
#'
#' This function add vector tiles, as created by
#' [tippecanoe](https://github.com/protomaps/tippecanoe), a software project
#' that builds vector tiles stored as .mbtiles files originally developed by
#' MapBox but subsequently maintained by protomaps.
#'
#'
#' @param map A \code{leaflet} or \code{mapview} map.
#' @param url The URL of vector tiles to add
#' @param layerName The name of the layer from the tiles to add
#' @param style Style elements to add
#' @param layerId The id of the layer to add
#' @param group The group that the layer belongs to if any
#' @examples
#' library(leaflet)
#' u_mbtiles = "https://www.carbon.place/tiles/pct/"
#' leaflet() %>% addProviderTiles("OpenStreetMap") %>% addPMTiles(u_mbtiles, layerName = "bicycle")
#' @export
addPMTiles = function(
map
, url
Expand Down Expand Up @@ -58,6 +77,7 @@ addPMTiles = function(
#' @param color line color
#' @param do_stroke logical, whether polygon borders should be drawn
#' @param width line width
#' @inheritParams addPMTiles
#'
#' @export
paintRules = function(
Expand Down
1 change: 1 addition & 0 deletions leafem.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ LaTeX: pdfLaTeX
StripTrailingWhitespace: Yes

BuildType: Package
PackageCleanBeforeInstall: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageCheckArgs: --as-cran
PackageRoxygenize: rd,collate,namespace
39 changes: 39 additions & 0 deletions man/addPMTiles.Rd

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

0 comments on commit 57c2d0a

Please sign in to comment.