diff --git a/DESCRIPTION b/DESCRIPTION index e946a868..aeaa26ef 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -42,7 +42,6 @@ Imports: glue (>= 1.6.0), jsonlite (>= 1.6.0), leaflet (>= 2.1.0), - leaflet.extras (>= 1.0.0), purrr (>= 0.3), readr (>= 2.1), readxl (>= 1.4.0), @@ -61,7 +60,7 @@ VignetteBuilder: knitr Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 Collate: 'bcdata-package.R' 'bcdc-get-citation.R' diff --git a/R/bcdc-web-services.R b/R/bcdc-web-services.R index 6dcd8e62..e6b3159a 100644 --- a/R/bcdc-web-services.R +++ b/R/bcdc-web-services.R @@ -281,7 +281,10 @@ make_wms <- function(x) { layers = glue::glue("pub:{x}"), options = wms_options ) %>% - leaflet.extras::addWMSLegend(uri = wms_legend) %>% + leaflet::addControl( + html = paste0(''), + position = "bottomright" + ) %>% leaflet::setView(lng = -126.5, lat = 54.5, zoom = 5) } # nocov end diff --git a/tests/testthat/test-get-data.R b/tests/testthat/test-get-data.R index 404ba472..054741e7 100644 --- a/tests/testthat/test-get-data.R +++ b/tests/testthat/test-get-data.R @@ -245,6 +245,7 @@ test_that("bcdc_get_data fails when no downloadable resources", { test_that("bcdc_get_data fails when >1 resource not specified & noninteractive", { skip_if_net_down() skip_on_cran() + skip_if(interactive()) expect_error( bcdc_get_data("21c72822-2502-4431-b9a2-92fc9401ef12"), "The record you are trying to access appears to have more than one resource." diff --git a/tests/testthat/test-query-geodata-filter.R b/tests/testthat/test-query-geodata-filter.R index ac392865..1f57aeeb 100644 --- a/tests/testthat/test-query-geodata-filter.R +++ b/tests/testthat/test-query-geodata-filter.R @@ -323,7 +323,9 @@ test_that("a BCGW name works with filter", { ret <- bcdc_query_geodata("WHSE_IMAGERY_AND_BASE_MAPS.GSR_AIRPORTS_SVW") %>% filter(WITHIN(little_box)) %>% collect() - expect_equal(nrow(ret), 367) + + expect_gt(nrow(ret), 350) + expect_lt(nrow(ret), 400) }) test_that("Using BBOX works", {