Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example docs #34 #59

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/{x}/{y}/{z}.pbf"
#' 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.