Skip to content

Commit

Permalink
Add anchors to links + fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Dec 17, 2024
1 parent bbbadc7 commit d8f6242
Show file tree
Hide file tree
Showing 26 changed files with 172 additions and 137 deletions.
36 changes: 18 additions & 18 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ new features:

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

miscellaneous:

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

## mapview 2.7.8

Expand Down Expand Up @@ -112,7 +112,7 @@ miscellaneous:

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

bugfixes:

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

## mapview 2.5.0

Expand All @@ -156,12 +156,12 @@ new features:

bugfixes:

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

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

enhancements:
Expand All @@ -247,22 +247,22 @@ new features:

bugfixes:

* na.alpha caused list/burst methods to fail.
* 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.
* `na.alpha` caused list/burst methods to fail.
* 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.

## mapview 2.1.0

new features:

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

bugfixes:

* deleted obsolete data.table import.
* fixed #79: colnames of popupTables are now converted to utf-8.
* fixed #79: colnames of popup Tables are now converted to utf-8.
* fixed #78: respect explicit setting of 'layer.name' argument.
* included NEWS file as R-help doesn't render NEWS.md
* highlight now respects alpha/alpha.regions = 0
Expand Down Expand Up @@ -331,7 +331,7 @@ new features:
* mapshot: to save maps as html page or static image or both.
* knitr integration (i.e. no need to call the @map slot anymore to render in knitr).
* 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.
* 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.
* 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.
* new popup functions popupTable, popupGraph and popupImage.
* functions to turn coordinates into spatial lines or spatial polygons.
* mapview objects now work natively on shiny applications (i.e. renderMapview and mapviewOutput now available).
Expand Down
4 changes: 2 additions & 2 deletions R/color.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
#' specified in at
#' @param at numeric vector giving the breakpoints for the colors
#' @param na.color the color for NA values.
#' @param ... additional arguments passed on to \code{\link{level.colors}}
#' @param ... additional arguments passed on to \code{\link[lattice]{level.colors}}
#'
#' @author
#' Tim Appelhans
#'
#' @seealso
#' \code{\link{level.colors}}
#' \code{\link[lattice]{level.colors}}
#'
#' @name mapviewColors
#' @export mapviewColors
Expand Down
4 changes: 2 additions & 2 deletions R/cubeView.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# #'
# #' @param x a RasterStack or RasterBrick
# #' @param at the breakpoints used for the visualisation. See
# #' \code{\link{levelplot}} for details.
# #' @param col.regions color (palette).See \code{\link{levelplot}} for details.
# #' \code{\link[lattice]{levelplot}} for details.
# #' @param col.regions color (palette).See \code{\link[lattice]{levelplot}} for details.
# #' @param na.color color for missing values.
# #' @param legend logical. Whether to plot a legend.
# #' @param ... currently not used.
Expand Down
8 changes: 4 additions & 4 deletions R/extent.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
#' @param map a leaflet or mapview map the extent should be added to. If NULL
#' standard background layers are created.
#' @param popup a \code{list} of HTML strings with the popup contents, usually
#' created from \code{\link{popupTable}}. See \code{\link{addControl}} for
#' created from \code{\link[leafpop]{popupTable}}. See \code{\link[leaflet]{addControl}} for
#' details.
#' @param layer.name the name of the layer to be shown on the map.
#' @param alpha.regions opacity of the fills or the raster layer(s).
#' @param label a character vector of labels to be shown on mouseover. See
#' \code{\link{addControl}} for details.
#' @param ... additional arguments passed on to \code{\link{addRectangles}}
#' \code{\link[leaflet]{addControl}} for details.
#' @inheritDotParams leaflet::addRectangles
#'
#' @author
#' Tim Appelhans
Expand All @@ -27,14 +27,14 @@
#' leaflet() %>% addProviderTiles("OpenStreetMap") %>% leafem::addExtent(breweries)
#' leaflet() %>% addProviderTiles("OpenStreetMap") %>% leafem::addExtent(breweries)
#'
#' @export viewExtent
#' @name viewExtent
#' @aliases viewExtent
#'
NULL

## View Extent ============================================================
#' @rdname viewExtent
#' @export
viewExtent <- function(x,
map = NULL,
popup = NULL,
Expand Down
58 changes: 29 additions & 29 deletions R/mapView.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if ( !isGeneric('mapView') ) {
#' @param map an optional existing map to be updated/added to.
#' @param band for stars layers, the band number to be plotted.
#' @param pane name of the map pane in which to render features. See
#' \code{\link{addMapPane}} for details. Currently only supported for vector layers.
#' \code{\link[leaflet]{addMapPane}} for details. Currently only supported for vector layers.
#' Ignored if \code{canvas = TRUE}. The default \code{"auto"} will create different panes
#' for points, lines and polygons such that points overlay lines overlay polygons.
#' Set to \code{NULL} to get default leaflet behaviour where allfeatures
Expand All @@ -44,12 +44,12 @@ if ( !isGeneric('mapView') ) {
#' If maxpixels < \code{ncell(x)}, sampleRegular is used before plotting.
#' @param color color (palette) for points/polygons/lines
#' @param col.regions color (palette) pixels.
#' See \code{\link{levelplot}} for details.
#' See \code{\link[lattice]{levelplot}} for details.
#' @param at the breakpoints used for the visualisation.
#' See \code{\link{levelplot}} for details.
#' See \code{\link[lattice]{levelplot}} for details.
#' @param na.color color for missing values
#' @param use.layer.names should layer names of the Raster* object be used?
#' @param map.types character spcifications for the base maps.
#' @param map.types character specifications for the base maps.
#' see \url{https://leaflet-extras.github.io/leaflet-providers/preview/}
#' for available options.
#' @param burst whether to show all (TRUE) or only one (FALSE) layer(s).
Expand All @@ -75,13 +75,13 @@ if ( !isGeneric('mapView') ) {
#' Defaults to TRUE
#' @param popup either \code{logical}, \code{character vector} or a \code{list}
#' of HTML strings with the popup contents, usually created from
#' \code{\link[leafpop]{popupTable}}. See \code{\link{addControl}} for details.
#' \code{\link[leafpop]{popupTable}}. See \code{\link[leaflet]{addControl}} for details.
#' If \code{FALSE} or \code{NULL} no popups will be created, if \code{TRUE}
#' a table with all feature attributes/columns will be created.
#' If a \code{character vector} of column names, the table will only show the
#' respective column entries.
#' @param label For vector data (sf/sp) a character vector of labels to be
#' shown on mouseover. See \code{\link{addControl}} for details. For raster
#' shown on mouseover. See \code{\link[leaflet]{addControl}} for details. For raster
#' data (Raster*/stars) a logical indicating whether to add image query.
#' @param native.crs logical whether to reproject to web map coordinate
#' reference system (web mercator - epsg:3857) or render using native CRS of
Expand All @@ -98,7 +98,7 @@ if ( !isGeneric('mapView') ) {
#' layer is of class \code{factor} in which case "ngb" is used.
#' @param highlight either \code{FALSE}, \code{NULL} or a list of styling
#' options for feature highlighting on mouse hover.
#' See \code{\link{highlightOptions}} for details.
#' See \code{\link[leaflet]{highlightOptions}} for details.
#' @param maxpoints the maximum number of points making up the geometry.
#' In case of lines and polygons this refers to the number of vertices. See
#' Details for more information.
Expand All @@ -107,21 +107,21 @@ if ( !isGeneric('mapView') ) {
#' @param query.digits for raster methods only. The amount of digits to be shown
#' by raster value query. Ignored if \code{label = FALSE}.
#' @param query.position for raster methods only. The position of the raster
#' value query info box. See \code{position} argument of \code{\link{addLegend}}
#' value query info box. See \code{position} argument of \code{\link[leaflet]{addLegend}}
#' for possible values. Ignored if \code{label = FALSE}.
#' @param query.prefix for raster methods only. a character string to be shown
#' as prefix for the layerId. Ignored if \code{label = FALSE}.
#' @param hide either a logical, a vector of layer names or a vector of layer indices.
#' See Details for more information on what exactly it does for different raster types.
#' @param ... additional arguments passed on to respective functions.
#' See \code{\link{addRasterImage}}, \code{\link{addCircles}},
#' \code{\link{addPolygons}}, \code{\link{addPolylines}} for details.
#' See \code{\link[leaflet]{addRasterImage}}, \code{\link[leaflet]{addCircles}},
#' \code{\link[leaflet]{addPolygons}}, \code{\link[leaflet]{addPolylines}} for details.
#' Furthermore, you can pass hidden arguments to some methods. See Details for
#' a list of supported hidden arguments.
#'
#' @details
#' \code{maxpoints} is taken to determine when to switch rendering from svg
#' to canvas overlay for perfomance. The threshold calculation is done as follows: \cr
#' to canvas overlay for performance. The threshold calculation is done as follows: \cr
#' if the number of points (in case of point data) or vertices (in case of
#' polygon or line data) > \code{maxpoints} then render using special render
#' function. Within this render function we approximate the complexity of
Expand Down Expand Up @@ -460,7 +460,7 @@ setMethod('mapView', signature(x = 'SpatRaster'), .stars_method)


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

setMethod('mapView', signature(x = 'RasterStackBrick'),
function(x,
Expand Down Expand Up @@ -531,7 +531,7 @@ setMethod('mapView', signature(x = 'RasterStackBrick'),


## Satellite object =======================================================
#' @describeIn mapView \code{\link{satellite}}
#' @describeIn mapView \code{\link[satellite]{satellite}}

setMethod('mapView', signature(x = 'Satellite'),
function(x,
Expand Down Expand Up @@ -840,7 +840,7 @@ setMethod('mapView', signature(x = 'SpatVector'), .sf_method)


## sfc ====================================================================
#' @describeIn mapView \code{\link{st_sfc}}
#' @describeIn mapView \code{\link[sf]{st_sfc}}

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


## XY =====================================================================
#' @describeIn mapView \code{\link{st_sfc}}
#' @describeIn mapView \code{\link[sf]{st_sfc}}

setMethod('mapView', signature(x = 'XY'),
function(x,
Expand Down Expand Up @@ -1219,7 +1219,7 @@ setMethod('mapView', signature(x = 'XY'),


## XYZ ====================================================================
#' @describeIn mapView \code{\link{st_sfc}}
#' @describeIn mapView \code{\link[sf]{st_sfc}}

setMethod('mapView', signature(x = 'XYZ'),
function(x,
Expand All @@ -1233,7 +1233,7 @@ setMethod('mapView', signature(x = 'XYZ'),


## XYM ====================================================================
#' @describeIn mapView \code{\link{st_sfc}}
#' @describeIn mapView \code{\link[sf]{st_sfc}}

setMethod('mapView', signature(x = 'XYM'),
function(x,
Expand All @@ -1247,7 +1247,7 @@ setMethod('mapView', signature(x = 'XYM'),


## XYZM ===================================================================
#' @describeIn mapView \code{\link{st_sfc}}
#' @describeIn mapView \code{\link[sf]{st_sfc}}

setMethod('mapView', signature(x = 'XYZM'),
function(x,
Expand All @@ -1261,7 +1261,7 @@ setMethod('mapView', signature(x = 'XYZM'),


## bbox =======================================================
#' @describeIn mapView \code{\link{st_bbox}}
#' @describeIn mapView \code{\link[sf]{st_bbox}}

setMethod('mapView', signature(x = 'bbox'),
function(x,
Expand Down Expand Up @@ -1416,7 +1416,7 @@ setMethod('mapview', signature('ANY'),
######## SP ###############################################################

## SpatialPixelsDataFrame =================================================
#' @describeIn mapView \code{\link{SpatialPixelsDataFrame}}
#' @describeIn mapView \code{\link[sp]{SpatialPixelsDataFrame}}
#'
setMethod('mapView', signature(x = 'SpatialPixelsDataFrame'),
function(x,
Expand Down Expand Up @@ -1482,7 +1482,7 @@ setMethod('mapView', signature(x = 'SpatialPixelsDataFrame'),


## SpatialGridDataFrame =================================================
#' @describeIn mapView \code{\link{SpatialGridDataFrame}}
#' @describeIn mapView \code{\link[sp]{SpatialGridDataFrame}}
#'
setMethod('mapView', signature(x = 'SpatialGridDataFrame'),
function(x,
Expand Down Expand Up @@ -1548,7 +1548,7 @@ setMethod('mapView', signature(x = 'SpatialGridDataFrame'),


## SpatialPointsDataFrame =================================================
#' @describeIn mapView \code{\link{SpatialPointsDataFrame}}
#' @describeIn mapView \code{\link[sp]{SpatialPointsDataFrame}}
setMethod('mapView', signature(x = 'SpatialPointsDataFrame'),
function(x,
zcol = NULL,
Expand All @@ -1562,7 +1562,7 @@ setMethod('mapView', signature(x = 'SpatialPointsDataFrame'),


## SpatialPoints ==========================================================
#' @describeIn mapView \code{\link{SpatialPoints}}
#' @describeIn mapView \code{\link[sp]{SpatialPoints}}

setMethod('mapView', signature(x = 'SpatialPoints'),
function(x,
Expand All @@ -1577,7 +1577,7 @@ setMethod('mapView', signature(x = 'SpatialPoints'),


## SpatialPolygonsDataFrame ===============================================
#' @describeIn mapView \code{\link{SpatialPolygonsDataFrame}}
#' @describeIn mapView \code{\link[sp]{SpatialPolygonsDataFrame}}

setMethod('mapView', signature(x = 'SpatialPolygonsDataFrame'),
function(x,
Expand All @@ -1592,7 +1592,7 @@ setMethod('mapView', signature(x = 'SpatialPolygonsDataFrame'),


## SpatialPolygons ========================================================
#' @describeIn mapView \code{\link{SpatialPolygons}}
#' @describeIn mapView \code{\link[sp]{SpatialPolygons}}

setMethod('mapView', signature(x = 'SpatialPolygons'),
function(x,
Expand All @@ -1607,7 +1607,7 @@ setMethod('mapView', signature(x = 'SpatialPolygons'),


## SpatialLinesDataFrame =================================================
#' @describeIn mapView \code{\link{SpatialLinesDataFrame}}
#' @describeIn mapView \code{\link[sp]{SpatialLinesDataFrame}}

setMethod('mapView', signature(x = 'SpatialLinesDataFrame'),
function(x,
Expand All @@ -1622,7 +1622,7 @@ setMethod('mapView', signature(x = 'SpatialLinesDataFrame'),


## SpatialLines ===========================================================
#' @describeIn mapView \code{\link{SpatialLines}}
#' @describeIn mapView \code{\link[sp]{SpatialLines}}

setMethod('mapView', signature(x = 'SpatialLines'),
function(x,
Expand Down
Loading

0 comments on commit d8f6242

Please sign in to comment.