Skip to content

Commit

Permalink
fix: spelling + examples
Browse files Browse the repository at this point in the history
  • Loading branch information
trafficonese committed Jan 12, 2025
1 parent df3f9be commit 7e2d7c0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
10 changes: 5 additions & 5 deletions R/layergroupcollision.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ layergroupCollisionDependency <- function() {
)
}

#' Add LayerGroup Collision Plugin to Leaflet Map
#' Add LayerGroup Collision Plugin
#'
#' @description Integrates the LayerGroup Collision plugin into a Leaflet map,
#' which hides overlapping markers and only displays the first added marker in a
Expand All @@ -34,24 +34,24 @@ layergroupCollisionDependency <- function() {
#' @inheritParams addDivicon
#' @references \url{https://github.com/MazeMap/Leaflet.LayerGroup.Collision}
#'
#' @name LayerroupCollision
#' @name LayerGroupCollision
#' @examples
#' library(leaflet)
#' library(sf)
#' library(leaflet.extras2)
#'
#' df <- sf::st_as_sf(atlStorms2005)
#' df <- suppressWarnings(st_cast(df, "POINT"))
#' df <- df[sample(1:nrow(df), 150, replace = FALSE), ]
#' df$classes <- sample(x = 1:5, nrow(df), replace = TRUE)
#'
#' leaflet() %>%
#' addProviderTiles("CartoDB.Positron") %>%
#' leaflet::addLayersControl(overlayGroups = c("Labels")) %>%
#' addPolylines(data = sf::st_as_sf(atlStorms2005), label = ~Name) %>%
#' addLayerGroupCollision(
#' data = df,
#' data = df, margin = 40,
#' html = ~ paste0(
#' '<div style="width: 70px" class="custom-html">',
#' '<div style="width: max-content; background-color: #cbc0c04f" class="custom-html">',
#' '<div class="title">', Name, "</div>",
#' '<div class="subtitle">MaxWind: ', MaxWind, "</div>",
#' "</div>"
Expand Down
29 changes: 15 additions & 14 deletions man/LayerroupCollision.Rd → man/LayerGroupCollision.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7e2d7c0

Please sign in to comment.