Skip to content

Commit

Permalink
Merge pull request #355 from USEPA/rmTShiny86
Browse files Browse the repository at this point in the history
add button to reset zoom on overview map
  • Loading branch information
cristinamullin authored Nov 8, 2023
2 parents b025c2e + a9266eb commit 4dea1e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Imports:
ggplot2,
sf,
leaflet,
leaflet.extras,
plotly,
remotes,
writexl
Expand Down
1 change: 1 addition & 0 deletions R/Figures.R
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ TADA_OverviewMap <- function(.data) {
leaflet::addProviderTiles("Esri.WorldTopoMap", group = "World topo", options = leaflet::providerTileOptions(updateWhenZooming = FALSE, updateWhenIdle = TRUE)) %>%
leaflet::clearShapes() %>% # get rid of whatever was there before if loading a second dataset
leaflet::fitBounds(lng1 = min(sumdat$TADA.LongitudeMeasure), lat1 = min(sumdat$TADA.LatitudeMeasure), lng2 = max(sumdat$TADA.LongitudeMeasure), lat2 = max(sumdat$TADA.LatitudeMeasure)) %>% # fit to bounds of data in tadat$raw
leaflet.extras::addResetMapButton() %>% # button to reset to initial zoom and lat/long
leaflet::addCircleMarkers(
data = sumdat,
lng = ~TADA.LongitudeMeasure,
Expand Down

0 comments on commit 4dea1e5

Please sign in to comment.