diff --git a/R/add_home_button.R b/R/add_home_button.R index 8ef1930aad3b87b77992a749ea49085cb0cb508b..514a9f54cf9617a571851a56a98b0430723f40d7 100644 --- a/R/add_home_button.R +++ b/R/add_home_button.R @@ -2,7 +2,7 @@ #' #' Add a button to a [Leaflet](https://leafletjs.com/) map that zooms to the provided map extent. #' -#' @param map '[leaflet][leaflet::leaflet]'. +#' @param map 'leaflet'. #' Map widget object #' @param position 'character' string. #' Position of the button on the web map. diff --git a/R/make_map.R b/R/make_map.R index 6998c5b29079bbcc207b4508451fe5842500f1d8..bd5134cf6325add031232507b78d7b2d211206e5 100644 --- a/R/make_map.R +++ b/R/make_map.R @@ -2,7 +2,7 @@ #' #' Create a [Leaflet](https://leafletjs.com/) map widget that includes base maps offered through #' [The National Map](https://www.usgs.gov/programs/national-geospatial-program/national-map) (TNM) -#' cached [service endpoints](https://apps.nationalmap.gov/services). +#' cached [service endpoints](https://apps.nationalmap.gov/services/). #' Information about the content of these base maps can be found within the #' [TNM Base Maps](https://apps.nationalmap.gov/help/3.0%20TNM%20Base%20Maps.htm) document. #' TNM content is limited to the United States and territories. diff --git a/README.Rmd b/README.Rmd index be19ca7e504fcb17bdf4ad0061de40bc8f6decbc..9f5bc07a048cac577ce2cc4ba73bccbfdb6c6e0e 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,8 +1,7 @@ --- output: md_document: - variant: markdown_github - md_extensions: -autolink_bare_uris+hard_line_breaks + variant: gfm --- # webmap <img src="man/figures/logo.svg" alt="webmap" align="right" width="152px" /> @@ -29,13 +28,11 @@ To install the package along with its dependencies, which are required to run ex install.packages("webmap", dependencies = TRUE) ``` -To install the development version of the package, you need to clone the repository and build from source, or run the following commands: +To install the development version of the package, you can either clone the repository and build it from source, or run the following commands. Make sure the **remotes** package for R is installed. ```r -if (!requireNamespace("remotes")) install.packages("remotes") remotes::install_gitlab( repo = "inl/webmap@develop", - auth_token = Sys.getenv("GITLAB_PAT"), host = "code.usgs.gov", dependencies = TRUE ) @@ -139,7 +136,6 @@ cat(s) [The National Map]: https://www.usgs.gov/programs/national-geospatial-program/national-map [R Markdown]: https://rmarkdown.rstudio.com/ [Shiny]: https://shiny.posit.co/ -[service endpoints]: https://apps.nationalmap.gov/services [leaflet-search library]: https://github.com/stefanocudini/leaflet-search [Leaflet.fullscreen library]: https://github.com/Leaflet/Leaflet.fullscreen [TNM services]: https://apps.nationalmap.gov/services/ diff --git a/README.md b/README.md index 99d5dfc77dc12faab600d42395c0a6bd3b2eeaed..8170ed38e3696113e0be0da6f53cf40463bb6a0c 100644 --- a/README.md +++ b/README.md @@ -39,14 +39,13 @@ to run examples in the package help documentation, run: install.packages("webmap", dependencies = TRUE) ``` -To install the development version of the package, you need to clone the -repository and build from source, or run the following commands: +To install the development version of the package, you can either clone +the repository and build it from source, or run the following commands. +Make sure the **remotes** package for R is installed. ``` r -if (!requireNamespace("remotes")) install.packages("remotes") remotes::install_gitlab( repo = "inl/webmap@develop", - auth_token = Sys.getenv("GITLAB_PAT"), host = "code.usgs.gov", dependencies = TRUE ) @@ -80,12 +79,12 @@ help(package = "webmap") ## Authors -- Jason C. Fisher (ORCID iD - [0000-0001-9032-8912](https://orcid.org/0000-0001-9032-8912)) -- Stefano Cudini ([leaflet-search - library](https://github.com/stefanocudini/leaflet-search)) -- John Firebaugh ([Leaflet.fullscreen - library](https://github.com/Leaflet/Leaflet.fullscreen)) +- Jason C. Fisher (ORCID iD + [0000-0001-9032-8912](https://orcid.org/0000-0001-9032-8912)) +- Stefano Cudini ([leaflet-search + library](https://github.com/stefanocudini/leaflet-search)) +- John Firebaugh ([Leaflet.fullscreen + library](https://github.com/Leaflet/Leaflet.fullscreen)) ## Point of Contact diff --git a/data/us_cities.rda b/data/us_cities.rda index de43ffc5d6c93a876c9051d3d9f494dec6187a45..372b0eb6c1ca9d14499212346c5f61246f76f867 100644 Binary files a/data/us_cities.rda and b/data/us_cities.rda differ diff --git a/inst/htmlwidgets/plugins/leaflet-search/leaflet-search.min.css b/inst/htmlwidgets/plugins/leaflet-search/leaflet-search.min.css index e301c732bce3a04f655932027c7fd8fbe3a3090c..53864b876ad78c28204d3c2ae791a4a7ecc02103 100644 --- a/inst/htmlwidgets/plugins/leaflet-search/leaflet-search.min.css +++ b/inst/htmlwidgets/plugins/leaflet-search/leaflet-search.min.css @@ -15,4 +15,4 @@ * */ - .leaflet-container .leaflet-control-search{position:relative;float:left;background:#fff;color:#1978cf;border:2px solid rgba(0,0,0,.2);background-clip:padding-box;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:rgba(255,255,255,.8);z-index:1000;margin-left:10px;margin-top:10px}.leaflet-control-search.search-exp{background:#fff;border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-control-search .search-input{display:block;float:left;background:#fff;border:1px solid #666;border-radius:2px;height:22px;padding:0 20px 0 2px;margin:4px 0 4px 4px}.leaflet-control-search.search-load .search-input{background:url(loader.gif) no-repeat center right #fff}.leaflet-control-search.search-load .search-cancel{visibility:hidden}.leaflet-control-search .search-cancel{display:block;width:22px;height:22px;position:absolute;right:28px;margin:6px 0;background:url(search-icon.png) no-repeat 0 -46px;text-decoration:none;filter:alpha(opacity=80);opacity:.8}.leaflet-control-search .search-cancel:hover{filter:alpha(opacity=100);opacity:1}.leaflet-control-search .search-cancel span{display:none;font-size:18px;line-height:20px;color:#ccc;font-weight:700}.leaflet-control-search .search-cancel:hover span{color:#aaa}.leaflet-control-search .search-button{display:block;float:left;width:30px;height:30px;background:url(search-icon.png) no-repeat 4px 4px #fff;border-radius:4px}.leaflet-control-search .search-button:hover{background:url(search-icon.png) no-repeat 4px -20px #fafafa}.leaflet-control-search .search-tooltip{position:absolute;top:100%;left:0;float:left;list-style:none;padding-left:0;min-width:120px;max-height:122px;box-shadow:1px 1px 6px rgba(0,0,0,.4);background-color:rgba(0,0,0,.25);z-index:1010;overflow-y:auto;overflow-x:hidden;cursor:pointer}.leaflet-control-search .search-tip{margin:2px;padding:2px 4px;display:block;color:#000;background:#eee;border-radius:.25em;text-decoration:none;white-space:nowrap;vertical-align:center}.leaflet-control-search .search-button:hover{background-color:#f4f4f4}.leaflet-control-search .search-tip-select,.leaflet-control-search .search-tip:hover{background-color:#fff}.leaflet-control-search .search-alert{cursor:pointer;clear:both;font-size:.75em;margin-bottom:5px;padding:0 .25em;color:#e00;font-weight:700;border-radius:.25em} +.leaflet-container .leaflet-control-search{position:relative;float:left;background:#fff;color:#1978cf;border:2px solid rgba(0,0,0,.2);background-clip:padding-box;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:rgba(255,255,255,.8);z-index:1000;margin-left:10px;margin-top:10px}.leaflet-control-search.search-exp{background:#fff;border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-control-search .search-input{display:block;float:left;background:#fff;border:1px solid #666;border-radius:2px;height:22px;padding:0 20px 0 2px;margin:4px 0 4px 4px}.leaflet-control-search.search-load .search-input{background:url(loader.gif) no-repeat center right #fff}.leaflet-control-search.search-load .search-cancel{visibility:hidden}.leaflet-control-search .search-cancel{display:block;width:22px;height:22px;position:absolute;right:28px;margin:6px 0;background:url(search-icon.png) no-repeat 0 -46px;text-decoration:none;filter:alpha(opacity=80);opacity:.8}.leaflet-control-search .search-cancel:hover{filter:alpha(opacity=100);opacity:1}.leaflet-control-search .search-cancel span{display:none;font-size:18px;line-height:20px;color:#ccc;font-weight:700}.leaflet-control-search .search-cancel:hover span{color:#aaa}.leaflet-control-search .search-button{display:block;float:left;width:30px;height:30px;background:url(search-icon.png) no-repeat 4px 4px #fff;border-radius:4px}.leaflet-control-search .search-button:hover{background:url(search-icon.png) no-repeat 4px -20px #fafafa}.leaflet-control-search .search-tooltip{position:absolute;top:100%;left:0;float:left;list-style:none;padding-left:0;min-width:120px;max-height:122px;box-shadow:1px 1px 6px rgba(0,0,0,.4);background-color:rgba(0,0,0,.25);z-index:1010;overflow-y:auto;overflow-x:hidden;cursor:pointer}.leaflet-control-search .search-tip{margin:2px;padding:2px 4px;display:block;color:#000;background:#eee;border-radius:.25em;text-decoration:none;white-space:nowrap;vertical-align:center}.leaflet-control-search .search-button:hover{background-color:#f4f4f4}.leaflet-control-search .search-tip-select,.leaflet-control-search .search-tip:hover{background-color:#fff}.leaflet-control-search .search-alert{cursor:pointer;clear:both;font-size:.75em;margin-bottom:5px;padding:0 .25em;color:#e00;font-weight:700;border-radius:.25em} diff --git a/man/add_cluster_button.Rd b/man/add_cluster_button.Rd index 3ab75db6e2ebacc6c2933f141d0a0274465ef96b..15ad5db83ca92af5efb4c48d20702cfcf7c0361c 100644 --- a/man/add_cluster_button.Rd +++ b/man/add_cluster_button.Rd @@ -7,7 +7,7 @@ add_cluster_button(map, cluster_id, position = "topleft") } \arguments{ -\item{map}{'\link[leaflet:leaflet]{leaflet}'. +\item{map}{'leaflet'. Map widget object} \item{cluster_id}{'character' string. diff --git a/man/add_fullscreen_button.Rd b/man/add_fullscreen_button.Rd index 573293c5dd346d8a241c17ddd3f47de1d927ffa6..6ed2b997b9afa27fb679de4ff35db3606538f34d 100644 --- a/man/add_fullscreen_button.Rd +++ b/man/add_fullscreen_button.Rd @@ -7,7 +7,7 @@ add_fullscreen_button(map, pseudo_fullscreen = FALSE, position = "topleft") } \arguments{ -\item{map}{'\link[leaflet:leaflet]{leaflet}'. +\item{map}{'leaflet'. Map widget object} \item{pseudo_fullscreen}{'logical' flag. diff --git a/man/add_home_button.Rd b/man/add_home_button.Rd index 3833b88144be7f1020e9e371fdd28c938b8ec904..f62538e0f1484ce8bfd05f3adf1f4b693968984f 100644 --- a/man/add_home_button.Rd +++ b/man/add_home_button.Rd @@ -7,7 +7,7 @@ add_home_button(map, extent = NULL, position = "topleft") } \arguments{ -\item{map}{'\link[leaflet:leaflet]{leaflet}'. +\item{map}{'leaflet'. Map widget object} \item{extent}{'bbox', or 'numeric' vector of length four, with \code{xmin}, \code{xmax}, \code{ymin} and \code{ymax} values. diff --git a/man/add_legend.Rd b/man/add_legend.Rd index d256c09ff9389b2ddb1a44d49c4fa017fb668a54..24084661f9f4b8c692528dd5dfbb41294017f28b 100644 --- a/man/add_legend.Rd +++ b/man/add_legend.Rd @@ -16,7 +16,7 @@ add_legend( ) } \arguments{ -\item{map}{'\link[leaflet:leaflet]{leaflet}'. +\item{map}{'leaflet'. Map widget object} \item{labels}{'character' vector. diff --git a/man/add_search_button.Rd b/man/add_search_button.Rd index f98068b6662b6b842574eeafd2a510be4d68d6af..476e283100e9f36e2801e6fb6309a6650446c880 100644 --- a/man/add_search_button.Rd +++ b/man/add_search_button.Rd @@ -15,7 +15,7 @@ add_search_button( ) } \arguments{ -\item{map}{'\link[leaflet:leaflet]{leaflet}'. +\item{map}{'leaflet'. Map widget object} \item{group}{'character' string. diff --git a/man/make_map.Rd b/man/make_map.Rd index 261fb15cf9dbc9659995229869dab38f7c8fd6e7..15cdc7762ea27beb8cc3fb6e27b8a5596ac63254 100644 --- a/man/make_map.Rd +++ b/man/make_map.Rd @@ -45,7 +45,7 @@ Graphic layers added to the web map must be in latitude and longitude using WGS \description{ Create a \href{https://leafletjs.com/}{Leaflet} map widget that includes base maps offered through \href{https://www.usgs.gov/programs/national-geospatial-program/national-map}{The National Map} (TNM) -cached \href{https://apps.nationalmap.gov/services}{service endpoints}. +cached \href{https://apps.nationalmap.gov/services/}{service endpoints}. Information about the content of these base maps can be found within the \href{https://apps.nationalmap.gov/help/3.0\%20TNM\%20Base\%20Maps.htm}{TNM Base Maps} document. TNM content is limited to the United States and territories.