Skip to content

Commit d8f6242

Browse files
committed
Add anchors to links + fix typos
1 parent bbbadc7 commit d8f6242

26 files changed

+172
-137
lines changed

NEWS.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ new features:
7676

7777
* new function removeMapJunk to remove control elements from a map (e.g. the zoom control).
7878
* added tentative support for platform 'leafgl'.
79-
* stars method now uses leafem::addGeoRaster. https://github.com/r-spatial/leafem/issues/25
80-
* leafem::addCopyExtent now included in all methods.
81-
* sf(c) methods now use leafem::addFgb if GDAL >= 3.1.
79+
* stars method now uses `leafem::addGeoRaster()`. https://github.com/r-spatial/leafem/issues/25
80+
* `leafem::addCopyExtent()` now included in all methods.
81+
* sf(c) methods now use `leafem::addFgb()` if GDAL >= 3.1.
8282
* new | operator to compare two maps side-by-side.
8383

8484
miscellaneous:
8585

8686
* all deprecated functions are now defunct. See ?`mapview-defunct`.
87-
* drop viridisLite dependency and use base::hcl.colors instead. We now depend on R >= 3.6.
87+
* drop viridisLite dependency and use `base::hcl.colors()` instead. We now depend on R >= 3.6.
8888

8989
## mapview 2.7.8
9090

@@ -112,7 +112,7 @@ miscellaneous:
112112

113113
* addMouseCoordinates now also displays native coordinates for leaflet maps. #205 - now moved to package leafem.
114114
* deprecated slideview, cubeview, latticeview & sync, plainview, popup* functions.
115-
* deprecated addFeatures, garnishMap, addHomeButton, addImageQuery, addLogo, addMouseCoordinates.
115+
* deprecated `addFeatures`, `garnishMap`, `addHomeButton`, `addImageQuery`, `addLogo`, `addMouseCoordinates`.
116116

117117
bugfixes:
118118

@@ -139,7 +139,7 @@ bugfixes:
139139
* isFALSE (caused errors on R < 3.5) is now handled properly.
140140
* mapshot does not unintentionally delete url anymore if saving to png with same name.
141141
* mapshot now properly deletes temporary url when saving to png (or png and html).
142-
* internal function mapview:::nrings now calculates number of polygon rings correctly. #181
142+
* internal function `mapview:::nrings` now calculates number of polygon rings correctly. #181
143143

144144
## mapview 2.5.0
145145

@@ -156,12 +156,12 @@ new features:
156156

157157
bugfixes:
158158

159-
* leaflet::addScalebar would prevent Raster* method from rendering correctly for multiple layers.
159+
* `leaflet::addScalebar()` would prevent Raster* method from rendering correctly for multiple layers.
160160
* cex was not respected when burst = TRUE. #149
161-
* popupTable no longer causes a stack overflow with large point data. #154
162-
* popupGraph no longer relies on png files on disk but embeds graphs via base64. #156
161+
* `popupTable()` no longer causes a stack overflow with large point data. #154
162+
* `popupGraph()` no longer relies on png files on disk but embeds graphs via base64. #156
163163
* in mapshot, remove temporary url files only if remove_url = TRUE. #157
164-
* removeMouseCoordinates should work properly now (also exported). #145
164+
* `removeMouseCoordinates()` should work properly now (also exported). #145
165165
* home button for single point now zooms to maximum zoom 18.
166166

167167
miscellaneous:
@@ -227,7 +227,7 @@ new features:
227227
* we now have mapview method for class 'numeric' which enables interactive plots of a numeric variable.
228228
* updated slideView to accommodate more than one incident in a flexdashboard #95
229229
* if supplied data has only one attribute/field column mapview will now colour the plot automatically according to that attribute/field.
230-
* new mapview method for class 'bbox' -> mapview(st_bbox(x)) is equivalent to viewExtent(x)
230+
* new mapview method for class 'bbox' -> `mapview(st_bbox(x))` is equivalent to `viewExtent(x)`
231231
* plainview now provides mouse coordinates
232232

233233
enhancements:
@@ -247,22 +247,22 @@ new features:
247247

248248
bugfixes:
249249

250-
* na.alpha caused list/burst methods to fail.
251-
* legend did not work when zcol only had one unique value. This was actually a delibarate choice as for a single map it doesn't really make sense to have a legend for only one color. However, for latticeView/sync this does actually make sense, hence re-enabled.
250+
* `na.alpha` caused list/burst methods to fail.
251+
* legend did not work when zcol only had one unique value. This was actually a deliberate choice as for a single map it doesn't really make sense to have a legend for only one color. However, for latticeView/sync this does actually make sense, hence re-enabled.
252252

253253
## mapview 2.1.0
254254

255255
new features:
256256

257-
* plainview/cubeview now respects/has gained argument na.color.
258-
* mapview now supports st_GEOMETRY with truely mixed feature types (e.g. LINESTRING and POLYGON) - fixes #85
259-
* addFeatures: one function to add them all. Type agnostic version of leaflet::add* functions for simple features objects.
257+
* plainview/cubeview now respects/has gained argument `na.color`.
258+
* mapview now supports st_GEOMETRY with truly mixed feature types (e.g. LINESTRING and POLYGON) - fixes #85
259+
* `addFeatures()`: one function to add them all. Type agnostic version of leaflet::add* functions for simple features objects.
260260
* mapview (for vector data only) has gained argument na.alpha to control opacity of missing values.
261261

262262
bugfixes:
263263

264264
* deleted obsolete data.table import.
265-
* fixed #79: colnames of popupTables are now converted to utf-8.
265+
* fixed #79: colnames of popup Tables are now converted to utf-8.
266266
* fixed #78: respect explicit setting of 'layer.name' argument.
267267
* included NEWS file as R-help doesn't render NEWS.md
268268
* highlight now respects alpha/alpha.regions = 0
@@ -331,7 +331,7 @@ new features:
331331
* mapshot: to save maps as html page or static image or both.
332332
* knitr integration (i.e. no need to call the @map slot anymore to render in knitr).
333333
* cubeView: view raster bricks or stacks hovmoeller style, use keys up & down, left & right, page up & page down to navigate through y, x, z dimensions, respectively.
334-
* labels: if zcol is set, mouseover will now show the repesctive values of zcol, if zcol is not set moseover shows feature ID. Only available if suitable leaflet package version is installed.
334+
* labels: if zcol is set, mouseover will now show the respective values of zcol, if zcol is not set moseover shows feature ID. Only available if suitable leaflet package version is installed.
335335
* new popup functions popupTable, popupGraph and popupImage.
336336
* functions to turn coordinates into spatial lines or spatial polygons.
337337
* mapview objects now work natively on shiny applications (i.e. renderMapview and mapviewOutput now available).

R/color.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
#' specified in at
77
#' @param at numeric vector giving the breakpoints for the colors
88
#' @param na.color the color for NA values.
9-
#' @param ... additional arguments passed on to \code{\link{level.colors}}
9+
#' @param ... additional arguments passed on to \code{\link[lattice]{level.colors}}
1010
#'
1111
#' @author
1212
#' Tim Appelhans
1313
#'
1414
#' @seealso
15-
#' \code{\link{level.colors}}
15+
#' \code{\link[lattice]{level.colors}}
1616
#'
1717
#' @name mapviewColors
1818
#' @export mapviewColors

R/cubeView.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# #'
33
# #' @param x a RasterStack or RasterBrick
44
# #' @param at the breakpoints used for the visualisation. See
5-
# #' \code{\link{levelplot}} for details.
6-
# #' @param col.regions color (palette).See \code{\link{levelplot}} for details.
5+
# #' \code{\link[lattice]{levelplot}} for details.
6+
# #' @param col.regions color (palette).See \code{\link[lattice]{levelplot}} for details.
77
# #' @param na.color color for missing values.
88
# #' @param legend logical. Whether to plot a legend.
99
# #' @param ... currently not used.

R/extent.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
#' @param map a leaflet or mapview map the extent should be added to. If NULL
88
#' standard background layers are created.
99
#' @param popup a \code{list} of HTML strings with the popup contents, usually
10-
#' created from \code{\link{popupTable}}. See \code{\link{addControl}} for
10+
#' created from \code{\link[leafpop]{popupTable}}. See \code{\link[leaflet]{addControl}} for
1111
#' details.
1212
#' @param layer.name the name of the layer to be shown on the map.
1313
#' @param alpha.regions opacity of the fills or the raster layer(s).
1414
#' @param label a character vector of labels to be shown on mouseover. See
15-
#' \code{\link{addControl}} for details.
16-
#' @param ... additional arguments passed on to \code{\link{addRectangles}}
15+
#' \code{\link[leaflet]{addControl}} for details.
16+
#' @inheritDotParams leaflet::addRectangles
1717
#'
1818
#' @author
1919
#' Tim Appelhans
@@ -27,14 +27,14 @@
2727
#' leaflet() %>% addProviderTiles("OpenStreetMap") %>% leafem::addExtent(breweries)
2828
#' leaflet() %>% addProviderTiles("OpenStreetMap") %>% leafem::addExtent(breweries)
2929
#'
30-
#' @export viewExtent
3130
#' @name viewExtent
3231
#' @aliases viewExtent
3332
#'
3433
NULL
3534

3635
## View Extent ============================================================
3736
#' @rdname viewExtent
37+
#' @export
3838
viewExtent <- function(x,
3939
map = NULL,
4040
popup = NULL,

R/mapView.R

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if ( !isGeneric('mapView') ) {
2929
#' @param map an optional existing map to be updated/added to.
3030
#' @param band for stars layers, the band number to be plotted.
3131
#' @param pane name of the map pane in which to render features. See
32-
#' \code{\link{addMapPane}} for details. Currently only supported for vector layers.
32+
#' \code{\link[leaflet]{addMapPane}} for details. Currently only supported for vector layers.
3333
#' Ignored if \code{canvas = TRUE}. The default \code{"auto"} will create different panes
3434
#' for points, lines and polygons such that points overlay lines overlay polygons.
3535
#' Set to \code{NULL} to get default leaflet behaviour where allfeatures
@@ -44,12 +44,12 @@ if ( !isGeneric('mapView') ) {
4444
#' If maxpixels < \code{ncell(x)}, sampleRegular is used before plotting.
4545
#' @param color color (palette) for points/polygons/lines
4646
#' @param col.regions color (palette) pixels.
47-
#' See \code{\link{levelplot}} for details.
47+
#' See \code{\link[lattice]{levelplot}} for details.
4848
#' @param at the breakpoints used for the visualisation.
49-
#' See \code{\link{levelplot}} for details.
49+
#' See \code{\link[lattice]{levelplot}} for details.
5050
#' @param na.color color for missing values
5151
#' @param use.layer.names should layer names of the Raster* object be used?
52-
#' @param map.types character spcifications for the base maps.
52+
#' @param map.types character specifications for the base maps.
5353
#' see \url{https://leaflet-extras.github.io/leaflet-providers/preview/}
5454
#' for available options.
5555
#' @param burst whether to show all (TRUE) or only one (FALSE) layer(s).
@@ -75,13 +75,13 @@ if ( !isGeneric('mapView') ) {
7575
#' Defaults to TRUE
7676
#' @param popup either \code{logical}, \code{character vector} or a \code{list}
7777
#' of HTML strings with the popup contents, usually created from
78-
#' \code{\link[leafpop]{popupTable}}. See \code{\link{addControl}} for details.
78+
#' \code{\link[leafpop]{popupTable}}. See \code{\link[leaflet]{addControl}} for details.
7979
#' If \code{FALSE} or \code{NULL} no popups will be created, if \code{TRUE}
8080
#' a table with all feature attributes/columns will be created.
8181
#' If a \code{character vector} of column names, the table will only show the
8282
#' respective column entries.
8383
#' @param label For vector data (sf/sp) a character vector of labels to be
84-
#' shown on mouseover. See \code{\link{addControl}} for details. For raster
84+
#' shown on mouseover. See \code{\link[leaflet]{addControl}} for details. For raster
8585
#' data (Raster*/stars) a logical indicating whether to add image query.
8686
#' @param native.crs logical whether to reproject to web map coordinate
8787
#' reference system (web mercator - epsg:3857) or render using native CRS of
@@ -98,7 +98,7 @@ if ( !isGeneric('mapView') ) {
9898
#' layer is of class \code{factor} in which case "ngb" is used.
9999
#' @param highlight either \code{FALSE}, \code{NULL} or a list of styling
100100
#' options for feature highlighting on mouse hover.
101-
#' See \code{\link{highlightOptions}} for details.
101+
#' See \code{\link[leaflet]{highlightOptions}} for details.
102102
#' @param maxpoints the maximum number of points making up the geometry.
103103
#' In case of lines and polygons this refers to the number of vertices. See
104104
#' Details for more information.
@@ -107,21 +107,21 @@ if ( !isGeneric('mapView') ) {
107107
#' @param query.digits for raster methods only. The amount of digits to be shown
108108
#' by raster value query. Ignored if \code{label = FALSE}.
109109
#' @param query.position for raster methods only. The position of the raster
110-
#' value query info box. See \code{position} argument of \code{\link{addLegend}}
110+
#' value query info box. See \code{position} argument of \code{\link[leaflet]{addLegend}}
111111
#' for possible values. Ignored if \code{label = FALSE}.
112112
#' @param query.prefix for raster methods only. a character string to be shown
113113
#' as prefix for the layerId. Ignored if \code{label = FALSE}.
114114
#' @param hide either a logical, a vector of layer names or a vector of layer indices.
115115
#' See Details for more information on what exactly it does for different raster types.
116116
#' @param ... additional arguments passed on to respective functions.
117-
#' See \code{\link{addRasterImage}}, \code{\link{addCircles}},
118-
#' \code{\link{addPolygons}}, \code{\link{addPolylines}} for details.
117+
#' See \code{\link[leaflet]{addRasterImage}}, \code{\link[leaflet]{addCircles}},
118+
#' \code{\link[leaflet]{addPolygons}}, \code{\link[leaflet]{addPolylines}} for details.
119119
#' Furthermore, you can pass hidden arguments to some methods. See Details for
120120
#' a list of supported hidden arguments.
121121
#'
122122
#' @details
123123
#' \code{maxpoints} is taken to determine when to switch rendering from svg
124-
#' to canvas overlay for perfomance. The threshold calculation is done as follows: \cr
124+
#' to canvas overlay for performance. The threshold calculation is done as follows: \cr
125125
#' if the number of points (in case of point data) or vertices (in case of
126126
#' polygon or line data) > \code{maxpoints} then render using special render
127127
#' function. Within this render function we approximate the complexity of
@@ -460,7 +460,7 @@ setMethod('mapView', signature(x = 'SpatRaster'), .stars_method)
460460

461461

462462
## Raster Stack/Brick ===========================================================
463-
#' @describeIn mapView \code{\link{stack}} / \code{\link{brick}}
463+
#' @describeIn mapView \code{\link[raster]{stack}} / \code{\link[raster]{brick}}
464464

465465
setMethod('mapView', signature(x = 'RasterStackBrick'),
466466
function(x,
@@ -531,7 +531,7 @@ setMethod('mapView', signature(x = 'RasterStackBrick'),
531531

532532

533533
## Satellite object =======================================================
534-
#' @describeIn mapView \code{\link{satellite}}
534+
#' @describeIn mapView \code{\link[satellite]{satellite}}
535535

536536
setMethod('mapView', signature(x = 'Satellite'),
537537
function(x,
@@ -840,7 +840,7 @@ setMethod('mapView', signature(x = 'SpatVector'), .sf_method)
840840

841841

842842
## sfc ====================================================================
843-
#' @describeIn mapView \code{\link{st_sfc}}
843+
#' @describeIn mapView \code{\link[sf]{st_sfc}}
844844

845845
setMethod('mapView', signature(x = 'sfc'),
846846
function(x,
@@ -1105,10 +1105,10 @@ setMethod('mapView', signature(x = 'numeric'),
11051105
#' data.frame method.
11061106
#' @param grid whether to plot a (scatter plot) xy-grid to aid interpretation
11071107
#' of the visualisation. Only relevant for the data.frame method.
1108-
#' @param aspect the ratio of x/y axis corrdinates to adjust the plotting
1108+
#' @param aspect the ratio of x/y axis coordinates to adjust the plotting
11091109
#' space to fit the screen. Only relevant for the data.frame method.
11101110
#' @param crs an optional crs specification for the provided data to enable
1111-
#' rendering on a basemap. See argument description in \code{\link{st_sf}}
1111+
#' rendering on a basemap. See argument description in \code{\link[sf]{st_sf}}
11121112
#' for details.
11131113
setMethod('mapView', signature(x = 'data.frame'),
11141114
function(x,
@@ -1151,7 +1151,7 @@ setMethod('mapView', signature(x = 'data.frame'),
11511151

11521152

11531153
## XY =====================================================================
1154-
#' @describeIn mapView \code{\link{st_sfc}}
1154+
#' @describeIn mapView \code{\link[sf]{st_sfc}}
11551155

11561156
setMethod('mapView', signature(x = 'XY'),
11571157
function(x,
@@ -1219,7 +1219,7 @@ setMethod('mapView', signature(x = 'XY'),
12191219

12201220

12211221
## XYZ ====================================================================
1222-
#' @describeIn mapView \code{\link{st_sfc}}
1222+
#' @describeIn mapView \code{\link[sf]{st_sfc}}
12231223

12241224
setMethod('mapView', signature(x = 'XYZ'),
12251225
function(x,
@@ -1233,7 +1233,7 @@ setMethod('mapView', signature(x = 'XYZ'),
12331233

12341234

12351235
## XYM ====================================================================
1236-
#' @describeIn mapView \code{\link{st_sfc}}
1236+
#' @describeIn mapView \code{\link[sf]{st_sfc}}
12371237

12381238
setMethod('mapView', signature(x = 'XYM'),
12391239
function(x,
@@ -1247,7 +1247,7 @@ setMethod('mapView', signature(x = 'XYM'),
12471247

12481248

12491249
## XYZM ===================================================================
1250-
#' @describeIn mapView \code{\link{st_sfc}}
1250+
#' @describeIn mapView \code{\link[sf]{st_sfc}}
12511251

12521252
setMethod('mapView', signature(x = 'XYZM'),
12531253
function(x,
@@ -1261,7 +1261,7 @@ setMethod('mapView', signature(x = 'XYZM'),
12611261

12621262

12631263
## bbox =======================================================
1264-
#' @describeIn mapView \code{\link{st_bbox}}
1264+
#' @describeIn mapView \code{\link[sf]{st_bbox}}
12651265

12661266
setMethod('mapView', signature(x = 'bbox'),
12671267
function(x,
@@ -1416,7 +1416,7 @@ setMethod('mapview', signature('ANY'),
14161416
######## SP ###############################################################
14171417

14181418
## SpatialPixelsDataFrame =================================================
1419-
#' @describeIn mapView \code{\link{SpatialPixelsDataFrame}}
1419+
#' @describeIn mapView \code{\link[sp]{SpatialPixelsDataFrame}}
14201420
#'
14211421
setMethod('mapView', signature(x = 'SpatialPixelsDataFrame'),
14221422
function(x,
@@ -1482,7 +1482,7 @@ setMethod('mapView', signature(x = 'SpatialPixelsDataFrame'),
14821482

14831483

14841484
## SpatialGridDataFrame =================================================
1485-
#' @describeIn mapView \code{\link{SpatialGridDataFrame}}
1485+
#' @describeIn mapView \code{\link[sp]{SpatialGridDataFrame}}
14861486
#'
14871487
setMethod('mapView', signature(x = 'SpatialGridDataFrame'),
14881488
function(x,
@@ -1548,7 +1548,7 @@ setMethod('mapView', signature(x = 'SpatialGridDataFrame'),
15481548

15491549

15501550
## SpatialPointsDataFrame =================================================
1551-
#' @describeIn mapView \code{\link{SpatialPointsDataFrame}}
1551+
#' @describeIn mapView \code{\link[sp]{SpatialPointsDataFrame}}
15521552
setMethod('mapView', signature(x = 'SpatialPointsDataFrame'),
15531553
function(x,
15541554
zcol = NULL,
@@ -1562,7 +1562,7 @@ setMethod('mapView', signature(x = 'SpatialPointsDataFrame'),
15621562

15631563

15641564
## SpatialPoints ==========================================================
1565-
#' @describeIn mapView \code{\link{SpatialPoints}}
1565+
#' @describeIn mapView \code{\link[sp]{SpatialPoints}}
15661566

15671567
setMethod('mapView', signature(x = 'SpatialPoints'),
15681568
function(x,
@@ -1577,7 +1577,7 @@ setMethod('mapView', signature(x = 'SpatialPoints'),
15771577

15781578

15791579
## SpatialPolygonsDataFrame ===============================================
1580-
#' @describeIn mapView \code{\link{SpatialPolygonsDataFrame}}
1580+
#' @describeIn mapView \code{\link[sp]{SpatialPolygonsDataFrame}}
15811581

15821582
setMethod('mapView', signature(x = 'SpatialPolygonsDataFrame'),
15831583
function(x,
@@ -1592,7 +1592,7 @@ setMethod('mapView', signature(x = 'SpatialPolygonsDataFrame'),
15921592

15931593

15941594
## SpatialPolygons ========================================================
1595-
#' @describeIn mapView \code{\link{SpatialPolygons}}
1595+
#' @describeIn mapView \code{\link[sp]{SpatialPolygons}}
15961596

15971597
setMethod('mapView', signature(x = 'SpatialPolygons'),
15981598
function(x,
@@ -1607,7 +1607,7 @@ setMethod('mapView', signature(x = 'SpatialPolygons'),
16071607

16081608

16091609
## SpatialLinesDataFrame =================================================
1610-
#' @describeIn mapView \code{\link{SpatialLinesDataFrame}}
1610+
#' @describeIn mapView \code{\link[sp]{SpatialLinesDataFrame}}
16111611

16121612
setMethod('mapView', signature(x = 'SpatialLinesDataFrame'),
16131613
function(x,
@@ -1622,7 +1622,7 @@ setMethod('mapView', signature(x = 'SpatialLinesDataFrame'),
16221622

16231623

16241624
## SpatialLines ===========================================================
1625-
#' @describeIn mapView \code{\link{SpatialLines}}
1625+
#' @describeIn mapView \code{\link[sp]{SpatialLines}}
16261626

16271627
setMethod('mapView', signature(x = 'SpatialLines'),
16281628
function(x,

0 commit comments

Comments
 (0)