Skip to content

Commit

Permalink
v2.0.4 (#719)
Browse files Browse the repository at this point in the history
* v2.0.4

* Update docs, fix a couple of partial match warnings, update revdep

* Fix broken leaflet doc links

* Fix more broken links

* More links

* Sigh, more links.

* Remove obsolete links

* DESCRIPTION link http->https

* Don't launch browsers during R CMD check

* Fix link

* More links

Co-authored-by: Joe Cheng <[email protected]>
  • Loading branch information
schloerke and jcheng5 authored Sep 22, 2021
1 parent 5bf15ec commit 982c37f
Show file tree
Hide file tree
Showing 75 changed files with 10,261 additions and 9,826 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: leaflet
Type: Package
Title: Create Interactive Web Maps with the JavaScript 'Leaflet' Library
Version: 2.0.3.9000
Version: 2.0.4.1
Authors@R: c(
person("Joe", "Cheng", email = "[email protected]", role = c("aut", "cre")),
person("Bhaskar", "Karambelkar", role = c("aut")),
Expand Down Expand Up @@ -31,7 +31,7 @@ Description: Create and customize interactive maps using the 'Leaflet'
directly from the R console, from 'RStudio', in Shiny applications and R Markdown
documents.
License: GPL-3
URL: http://rstudio.github.io/leaflet/
URL: https://rstudio.github.io/leaflet/
BugReports: https://github.com/rstudio/leaflet/issues
Depends: R (>= 3.1.0)
Imports:
Expand Down
11 changes: 4 additions & 7 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
leaflet 2.0.3.9000
leaflet 2.0.4
--------------------------------------------------------------------------------

BREAKING CHANGES
*

FEATURES
* Updated proj4.js to 2.6.2

BUG FIXES and IMPROVEMENTS
*
* Minor tweaks to example data and tests, required to stay on CRAN



Expand Down Expand Up @@ -60,7 +57,7 @@ leaflet 2.0.0

BREAKING CHANGES

* Update to latest leaflet.js v1.3.1 (#453, 314616f) Please see http://leafletjs.com/reference-1.3.0.html for the latest documentation
* Update to latest leaflet.js v1.3.1 (#453, 314616f) Please see https://leafletjs.com/reference-1.3.4.html for the latest documentation

* All plugins updated to versions compatible with leaflet > 1.0 (#458)

Expand Down Expand Up @@ -91,7 +88,7 @@ BUG FIXES AND FEATURES

* Added more providers for `addProviderTiles()`: "OpenStreetMap.CH", "OpenInfraMap", "OpenInfraMap.Power", "OpenInfraMap.Telecom", "OpenInfraMap.Petroleum", "OpenInfraMap.Water", "OpenPtMap", "OpenRailwayMap", "OpenFireMap", "SafeCast". (4aea447)

* `L.multiPolyline` was absorbed into `L.polyline`, which accepts multiple an array of polyline information. http://leafletjs.com/reference-1.3.0.html#polyline. (#515)
* `L.multiPolyline` was absorbed into `L.polyline`, which accepts multiple an array of polyline information. https://leafletjs.com/reference-1.3.4.html#polyline. (#515)

* Fix bug where icons where anchored to the top-center, not center-center (2a60751)

Expand Down
26 changes: 13 additions & 13 deletions R/colors.R
Original file line number Diff line number Diff line change
Expand Up @@ -260,20 +260,20 @@ colorFactor <- function(palette, domain, levels = NULL, ordered = FALSE,
#' pal <- colorBin("Greens", domain = 0:100)
#' pal(runif(10, 60, 100))
#'
#' \donttest{
#' # Exponential distribution, mapped continuously
#' previewColors(colorNumeric("Blues", domain = NULL), sort(rexp(16)))
#' # Exponential distribution, mapped by interval
#' previewColors(colorBin("Blues", domain = NULL, bins = 4), sort(rexp(16)))
#' # Exponential distribution, mapped by quantile
#' previewColors(colorQuantile("Blues", domain = NULL), sort(rexp(16)))
#' if (interactive()) {
#' # Exponential distribution, mapped continuously
#' previewColors(colorNumeric("Blues", domain = NULL), sort(rexp(16)))
#' # Exponential distribution, mapped by interval
#' previewColors(colorBin("Blues", domain = NULL, bins = 4), sort(rexp(16)))
#' # Exponential distribution, mapped by quantile
#' previewColors(colorQuantile("Blues", domain = NULL), sort(rexp(16)))
#'
#' # Categorical data; by default, the values being colored span the gamut...
#' previewColors(colorFactor("RdYlBu", domain = NULL), LETTERS[1:5])
#' # ...unless the data is a factor, without droplevels...
#' previewColors(colorFactor("RdYlBu", domain = NULL), factor(LETTERS[1:5], levels = LETTERS))
#' # ...or the domain is stated explicitly.
#' previewColors(colorFactor("RdYlBu", levels = LETTERS), LETTERS[1:5])
#' # Categorical data; by default, the values being colored span the gamut...
#' previewColors(colorFactor("RdYlBu", domain = NULL), LETTERS[1:5])
#' # ...unless the data is a factor, without droplevels...
#' previewColors(colorFactor("RdYlBu", domain = NULL), factor(LETTERS[1:5], levels = LETTERS))
#' # ...or the domain is stated explicitly.
#' previewColors(colorFactor("RdYlBu", levels = LETTERS), LETTERS[1:5])
#' }
#' @rdname colorNumeric
#' @name colorNumeric
Expand Down
4 changes: 2 additions & 2 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ NULL
#' @name gadmCHE
#' @title Administrative borders of Switzerland (level 1)
#' @description Administrative borders of Switzerland (level 1)
#' @details This dataset comes from \url{http://gadm.org}.
#' @details This dataset comes from \url{https://gadm.org}.
#' It was downloaded using \code{\link{getData}}.
#' @format \code{sp::SpatialPolygonsDataFrame}
#' @source
#' \url{http://gadm.org}
#' \url{https://gadm.org}
NULL

#'
Expand Down
20 changes: 10 additions & 10 deletions R/layers.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ groupOptions <- function(map, group, zoomLevels = NULL) {
#' \code{\link{popupOptions}}, \code{\link{markerOptions}},
#' \code{\link{pathOptions}}
#' @references The Leaflet API documentation:
#' \url{http://leafletjs.com/reference-1.3.1.html}
#' \url{https://leafletjs.com/reference-1.3.4.html}
#' @describeIn map-layers Add a tile layer to the map
#' @export
addTiles <- function(
Expand Down Expand Up @@ -340,7 +340,7 @@ clearImages <- function(map) {
#' @param
#' minZoom,maxZoom,maxNativeZoom,tileSize,subdomains,errorTileUrl,tms,noWrap,zoomOffset,zoomReverse,zIndex,unloadInvisibleTiles,updateWhenIdle,detectRetina
#' the tile layer options; see
#' \url{http://leafletjs.com/reference-1.3.1.html#tilelayer}
#' \url{https://leafletjs.com/reference-1.3.4.html#tilelayer}
#' @param ... extra options passed to underlying Javascript object constructor.
#' @describeIn map-options Options for tile layers
#' @export
Expand Down Expand Up @@ -482,7 +482,7 @@ addPopups <- function(
#' @param className a CSS class name set on an element
#' @param
#' maxWidth,minWidth,maxHeight,autoPan,keepInView,closeButton,closeOnClick
#' popup options; see \url{http://leafletjs.com/reference-1.3.1.html#popup-option}
#' popup options; see \url{https://leafletjs.com/reference-1.3.4.html#popup-option}
#' @describeIn map-options Options for popups
#' @export
popupOptions <- function(
Expand Down Expand Up @@ -550,13 +550,13 @@ safeLabel <- function(label, data) {

#' @param
#' noHide,direction,offset,permanent
#' label options; see \url{http://leafletjs.com/reference-1.3.1.html#tooltip-option}
#' @param opacity Tooltip container opacity. Ranges from 0 to 1. Default value is \code{1} (different from leaflet.js \code{0.9}); see \url{http://leafletjs.com/reference-1.3.1.html#tooltip-opacity}
#' label options; see \url{https://leafletjs.com/reference-1.3.4.html#tooltip-option}
#' @param opacity Tooltip container opacity. Ranges from 0 to 1. Default value is \code{1} (different from leaflet.js \code{0.9}); see \url{https://leafletjs.com/reference-1.3.4.html#tooltip-opacity}
#' @param textsize Change the text size of a single tooltip
#' @param textOnly Display only the text, no regular surrounding box.
#' @param style list of css style to be added to the tooltip
#' @param zoomAnimation deprecated. See \url{https://github.com/Leaflet/Leaflet/blob/master/CHANGELOG.md#api-changes-5}
#' @param sticky If true, the tooltip will follow the mouse instead of being fixed at the feature center. Default value is \code{TRUE} (different from leaflet.js \code{FALSE}); see \url{http://leafletjs.com/reference-1.3.1.html#tooltip-sticky}
#' @param sticky If true, the tooltip will follow the mouse instead of being fixed at the feature center. Default value is \code{TRUE} (different from leaflet.js \code{FALSE}); see \url{https://leafletjs.com/reference-1.3.4.html#tooltip-sticky}
#' @describeIn map-options Options for labels
#' @export
labelOptions <- function(
Expand Down Expand Up @@ -880,7 +880,7 @@ b64EncodePackedIcons <- function(packedIcons) {
#' @param clickable DEPRECATED! Use the \code{interactive} option.
#' @param
#' draggable,keyboard,title,alt,zIndexOffset,riseOnHover,riseOffset
#' marker options; see \url{http://leafletjs.com/reference-1.3.1.html#marker-option}
#' marker options; see \url{https://leafletjs.com/reference-1.3.4.html#marker-option}
#' @describeIn map-options Options for markers
#' @export
markerOptions <- function(
Expand Down Expand Up @@ -913,7 +913,7 @@ markerOptions <- function(
#' spiderfy it so you can see all of its markers
#' @param removeOutsideVisibleBounds clusters and markers too far from the
#' viewport are removed from the map for performance
#' @param spiderLegPolylineOptions Allows you to specify PolylineOptions (\url{http://leafletjs.com/reference-1.3.1.html#polyline-option}) to style spider legs. By default, they are { weight: 1.5, color: "#222", opacity: 0.5 }
#' @param spiderLegPolylineOptions Allows you to specify PolylineOptions (\url{https://leafletjs.com/reference-1.3.4.html#polyline-option}) to style spider legs. By default, they are { weight: 1.5, color: "#222", opacity: 0.5 }
#' @param freezeAtZoom Allows you to freeze cluster expansion to a zoom level.
#' Can be a zoom level e.g. 10, 12 or "max" or "maxKeepSpiderify"
#' See \url{https://github.com/ghybs/Leaflet.MarkerCluster.Freezable#api-reference}
Expand Down Expand Up @@ -949,7 +949,7 @@ markerClusterOptions <- function(
#' @param fillColor fill color
#' @param fillOpacity fill opacity
#' @param dashArray a string that defines the stroke
#' \href{https://developer.mozilla.org/en/SVG/Attribute/stroke-dasharray}{dash
#' \href{https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray}{dash
#' pattern}
#' @describeIn map-layers Add circle markers to the map
#' @export
Expand Down Expand Up @@ -1287,7 +1287,7 @@ clearGeoJSON <- function(map) {
#' Add UI controls to switch layers on and off
#'
#' Uses Leaflet's built-in
#' \href{http://leafletjs.com/reference-1.3.1.html#control-layers}{layers control}
#' \href{https://leafletjs.com/reference-1.3.4.html#control-layers}{layers control}
#' feature to allow users to choose one of several base layers, and to choose
#' any number of overlay layers to view.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/leaflet.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ mapOptions <- function(map, zoomToLimits = c("always", "first", "never")) {
#' @param preferCanvas Whether leaflet.js Paths should be rendered on a Canvas renderer.
#' @param ... other options used for leaflet.js map creation.
#' @describeIn leaflet Options for map creation
#' @seealso See \url{http://leafletjs.com/reference-1.3.1.html#map-option} for details and more options.
#' @seealso See \url{https://leafletjs.com/reference-1.3.4.html#map-option} for details and more options.
#' @export
leafletOptions <- function(
minZoom = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/mapPane.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' over the order of the layers, e.g. points always on top of polygons.
#' If two layers are provided to the same pane, overlay will be determined by
#' order of adding. See examples below.
#' See \url{http://www.leafletjs.com/reference-1.3.0.html#map-pane} for details.
#' See \url{https://leafletjs.com/reference-1.3.4.html#map-pane} for details.
#'
#' If the error "Cannot read property 'appendChild' of undefined" occurs, make
#' sure the pane being used for used for display has already been added to the map.
Expand Down
4 changes: 2 additions & 2 deletions R/methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#' @param lat The latitude of the map center
#' @param zoom the zoom level
#' @param options a list of zoom/pan options (see
#' \url{http://leafletjs.com/reference-1.3.1.html#zoom/pan-options})
#' @references \url{http://leafletjs.com/reference-1.3.1.html#map-methods-for-modifying-map-state}
#' \url{https://leafletjs.com/reference-1.3.4.html#zoom/pan-options})
#' @references \url{https://leafletjs.com/reference-1.3.4.html#map-methods-for-modifying-map-state}
#' @return The modified map widget.
#' @describeIn map-methods Set the view of the map (center and zoom level)
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/plugin-graticule.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ leafletGraticuleDependencies <- function() {
#' @param map a map widget object
#' @param interval The spacing in map units between horizontal and vertical lines.
#' @param sphere boolean. Default FALSE
#' @param style path options for the generated lines. See \url{http://leafletjs.com/reference-1.3.1.html#path-option}
#' @param style path options for the generated lines. See \url{https://leafletjs.com/reference-1.3.4.html#path-option}
#' @param layerId the layer id
#' @param group the name of the group this layer belongs to.
#' @param options the path options for the graticule layer
Expand Down
4 changes: 2 additions & 2 deletions R/plugin-measure.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ leafletMeasureDependencies <- function() {
#' Add a measure control to the map.
#'
#' @param map a map widget object
#' @param position standard \href{http://leafletjs.com/reference-1.3.1.html#control-positions}{Leaflet control position options}.
#' @param position standard \href{https://leafletjs.com/reference-1.3.4.html#control-positions}{Leaflet control position options}.
#' @param primaryLengthUnit,secondaryLengthUnit units used to display length
#' results. secondaryLengthUnit is optional.
#' Valid values are \code{"feet"}, \code{"meters"}, \code{"miles"}, and \code{"kilometers"}.
Expand All @@ -28,7 +28,7 @@ leafletMeasureDependencies <- function() {
#' Value should be a color represented as a hexadecimal string.
#' @param popupOptions \code{list} of options applied to the popup
#' of the resulting measure feature.
#' Properties may be any \href{http://leafletjs.com/reference-1.3.1.html#popup-option}{standard Leaflet popup options}.
#' Properties may be any \href{https://leafletjs.com/reference-1.3.4.html#popup-option}{standard Leaflet popup options}.
#' @param captureZIndex Z-index of the marker used to capture measure clicks.
#' Set this value higher than the z-index of all other map layers to
#' disable click events on other layers while a measurement is active.
Expand Down
4 changes: 2 additions & 2 deletions R/plugin-minimap.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ leafletMiniMapDependencies <- function() {
#' Especially useful when 'zoomLevelFixed' is set.
#' @param minimized Sets whether the minimap should start in a minimized position.
#' @param aimingRectOptions Sets the style of the aiming rectangle by passing in
#' a Path.Options (\url{http://leafletjs.com/reference-1.3.1.html#path-options}) object.
#' a Path.Options (\url{https://leafletjs.com/reference-1.3.4.html#path-options}) object.
#' (Clickable will always be overridden and set to false.)
#' @param shadowRectOptions Sets the style of the aiming shadow rectangle by passing in
#' a Path.Options (\url{http://leafletjs.com/reference-1.3.1.html#path-option}) object.
#' a Path.Options (\url{https://leafletjs.com/reference-1.3.4.html#path-option}) object.
#' (Clickable will always be overridden and set to false.)
#' @param strings Overrides the default strings allowing for translation.
#' @param tiles URL for tiles or one of the pre-defined providers.
Expand Down
2 changes: 1 addition & 1 deletion R/plugin-providers.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ addProviderTiles <- function(
#' @param
#' errorTileUrl,noWrap,opacity,zIndex,updateWhenIdle,detectRetina
#' the tile layer options; see
#' \url{http://leafletjs.com/reference-1.3.1.html#tilelayer}
#' \url{https://leafletjs.com/reference-1.3.4.html#tilelayer}
#' @param ... named parameters to add to the options
#' @rdname addProviderTiles
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/scalebar.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Add or remove a scale bar
#'
#' Uses Leaflet's built-in
#' \href{http://leafletjs.com/reference-1.3.1.html#control-scale}{scale bar}
#' \href{https://leafletjs.com/reference-1.3.4.html#control-scale}{scale bar}
#' feature to add a scale bar.
#'
#' @param map the map to add the scale bar to
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![RStudio community](https://img.shields.io/badge/community-leaflet-blue?style=social&logo=rstudio&logoColor=75AADB)](https://community.rstudio.com/new-topic?title=&tags=leaflet&body=%0A%0A%0A%20%20--------%0A%20%20%0A%20%20%3Csup%3EReferred%20here%20by%20%60leaflet%60%27s%20GitHub%3C/sup%3E%0A&u=barret)
<!-- badges: end -->

[Leaflet](http://leafletjs.com) is an open-source JavaScript library for
[Leaflet](https://leafletjs.com) is an open-source JavaScript library for
interactive maps. This R package makes it easy to create Leaflet maps from R.

```r
Expand Down Expand Up @@ -37,13 +37,13 @@ devtools::install_github('rstudio/leaflet')
## Documentation

In addition to the usual R package documentation, we also have extensive docs and examples at:
http://rstudio.github.io/leaflet You may use [GitHub issues](https://github.com/rstudio/leaflet/issues) to file bug reports or feature requests, and ask questions on [StackOverflow](http://stackoverflow.com/questions/tagged/r+leaflet) or in the [Shiny mailing list](https://groups.google.com/forum/#!forum/shiny-discuss).
[https://rstudio.github.io/leaflet/](https://rstudio.github.io/leaflet/)

## Development

`leaflet`'s JavaScript build tools use Node.js, along with [yarn](https://yarnpkg.com/) to manage the JavaScript packages.

Install `yarn` using the [official instructions](https://yarnpkg.com/en/docs/install).
Install `yarn` using the [official instructions](https://classic.yarnpkg.com/en/docs/install).

You can test that Node.js and yarn are installed properly by running the following commands:

Expand Down Expand Up @@ -72,6 +72,6 @@ yarn watch
## License

This package is licensed to you under the terms of the [GNU General Public
License](http://www.gnu.org/licenses/gpl.html) version 3 or later.
License](https://www.gnu.org/licenses/gpl-3.0.html) version 3 or later.

Copyright 2013-2015 RStudio, Inc.
20 changes: 16 additions & 4 deletions docs/basemaps.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<html>

<head>

<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />

Expand All @@ -14,6 +13,7 @@

<title>Leaflet for R - Using Basemaps</title>

<script src="libs/header-attrs/header-attrs.js"></script>
<script src="libs/jquery/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="libs/bootstrap/css/flatly.min.css" rel="stylesheet" />
Expand All @@ -23,17 +23,28 @@
<script src="libs/navigation/tabsets.js"></script>
<link href="libs/highlightjs/default.css" rel="stylesheet" />
<script src="libs/highlightjs/highlight.js"></script>
<link href="libs/anchor-sections/anchor-sections.css" rel="stylesheet" />
<script src="libs/anchor-sections/anchor-sections.js"></script>
<script src="libs/htmlwidgets/htmlwidgets.js"></script>
<link href="libs/leaflet/leaflet.css" rel="stylesheet" />
<script src="libs/leaflet/leaflet.js"></script>
<link href="libs/leafletfix/leafletfix.css" rel="stylesheet" />
<script src="libs/Proj4Leaflet/proj4-compressed.js"></script>
<script src="libs/proj4/proj4.min.js"></script>
<script src="libs/Proj4Leaflet/proj4leaflet.js"></script>
<link href="libs/rstudio_leaflet/rstudio_leaflet.css" rel="stylesheet" />
<script src="libs/leaflet-binding/leaflet.js"></script>
<script src="libs/leaflet-providers/leaflet-providers_1.9.0.js"></script>
<script src="libs/leaflet-providers-plugin/leaflet-providers-plugin.js"></script>

<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>

<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
Expand Down Expand Up @@ -155,6 +166,7 @@
border: none;
display: inline-block;
border-radius: 4px;
background-color: transparent;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
Expand Down Expand Up @@ -598,7 +610,7 @@ <h3>Combining Tile Layers</h3>

// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
Expand Down
Loading

0 comments on commit 982c37f

Please sign in to comment.