Skip to content

Commit a3daa60

Browse files
committed
updated docs
1 parent 9359d4c commit a3daa60

3 files changed

Lines changed: 22 additions & 12 deletions

File tree

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,5 @@ importFrom(terra,rast)
6363
importFrom(terra,writeRaster)
6464
importFrom(utils,head)
6565
importFrom(utils,installed.packages)
66+
importFrom(utils,read.csv)
67+
importFrom(utils,write.csv)

R/defaults.R

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ reset_defaults <- function(){
6565
#'
6666
#' @param map_service character.
6767
#' \itemize{
68-
#' \item{for \code{get_maptypes()}:}{ optional, either \code{"osm"}, \code{"osm_stamen"}, \code{"osm_stadia"}, \code{"osm_thunderforest"}, \code{"carto"}, \code{"mapbox"}, \code{"esri"} or \code{"maptiler"}. Otherwise, a list of map types for both services is returned.}
69-
#' \item{for \code{add_maptypes()}:}{ character, name of map service the map type to add belongs to}
68+
#' \item for \code{get_maptypes()}: optional, either \code{"osm"}, \code{"osm_stamen"}, \code{"osm_stadia"}, \code{"osm_thunderforest"}, \code{"carto"}, \code{"mapbox"}, \code{"esri"} or \code{"maptiler"}. Otherwise, a list of map types for both services is returned.
69+
#' \item for \code{add_maptypes()}: character, name of map service the map type to add belongs to
7070
#' }
7171
#'
7272
#' @param as_df logical, whether to return a data.frame instead of a list (defaults to \code{FALSE})
@@ -124,14 +124,17 @@ reset_defaults <- function(){
124124
#' get_maptypes(as_df = TRUE, url_cols = TRUE)
125125
#'
126126
#' # add a custom map service and type yourself:
127-
#' add_maptypes(map_service = "someservice", map_type = "terrain", url_endpoint = "https://tile.someservice.org")
127+
#' add_maptypes(
128+
#' map_service = "someservice", map_type = "terrain",
129+
#' url_endpoint = "https://tile.someservice.org")
128130
#'
129131
#' # control further aspects of a custom map service and type:
130132
#' add_maptypes(
131-
#' map_service = "someservice", map_type = "terrain", url_endpoint = "https://tile.someservice.org",
132-
#' url_xy = "xy", # defining the order in which this service expects tile x and y subscripts
133+
#' map_service = "someservice", map_type = "terrain",
134+
#' url_endpoint = "https://tile.someservice.org",
135+
#' url_xy = "xy", # order in which this service expects tile x and y id
133136
#' url_file_format = ".png",
134-
#' url_map_token = "?authtoken=", # some services expect query parameters for transmitting an auth token
137+
#' url_map_token = "?authtoken=", # query params for auth token
135138
#' auth_error_code = 401,
136139
#' url_website = "https://someservice.org"
137140
#' )
@@ -207,6 +210,7 @@ add_maptypes <- function(map_service, map_type, url_endpoint, url_xy = "xy", url
207210
}
208211

209212
#' @rdname maptypes
213+
#' @importFrom utils write.csv
210214
#' @export
211215
save_maptypes <- function(file){
212216
mt <- get_maptypes(as_df = T, url_cols = T)
@@ -216,6 +220,7 @@ save_maptypes <- function(file){
216220

217221

218222
#' @rdname maptypes
223+
#' @importFrom utils read.csv
219224
#' @export
220225
load_maptypes <- function(file){
221226
mt <- read.csv(file)

man/maptypes.Rd

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)