Skip to content

Commit 81891d1

Browse files
authored
Merge pull request #364 from bcgov/fix/drop-dep
FIX: Alternative to leaflet.extras
2 parents 0885291 + da6733c commit 81891d1

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ Imports:
4242
glue (>= 1.6.0),
4343
jsonlite (>= 1.6.0),
4444
leaflet (>= 2.1.0),
45-
leaflet.extras (>= 1.0.0),
4645
purrr (>= 0.3),
4746
readr (>= 2.1),
4847
readxl (>= 1.4.0),
@@ -61,7 +60,7 @@ VignetteBuilder:
6160
knitr
6261
Encoding: UTF-8
6362
Roxygen: list(markdown = TRUE)
64-
RoxygenNote: 7.3.2
63+
RoxygenNote: 7.3.3
6564
Collate:
6665
'bcdata-package.R'
6766
'bcdc-get-citation.R'

R/bcdc-web-services.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,10 @@ make_wms <- function(x) {
281281
layers = glue::glue("pub:{x}"),
282282
options = wms_options
283283
) %>%
284-
leaflet.extras::addWMSLegend(uri = wms_legend) %>%
284+
leaflet::addControl(
285+
html = paste0('<img src="', wms_legend, '">'),
286+
position = "bottomright"
287+
) %>%
285288
leaflet::setView(lng = -126.5, lat = 54.5, zoom = 5)
286289
} # nocov end
287290

tests/testthat/test-get-data.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ test_that("bcdc_get_data fails when no downloadable resources", {
245245
test_that("bcdc_get_data fails when >1 resource not specified & noninteractive", {
246246
skip_if_net_down()
247247
skip_on_cran()
248+
skip_if(interactive())
248249
expect_error(
249250
bcdc_get_data("21c72822-2502-4431-b9a2-92fc9401ef12"),
250251
"The record you are trying to access appears to have more than one resource."

tests/testthat/test-query-geodata-filter.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@ test_that("a BCGW name works with filter", {
323323
ret <- bcdc_query_geodata("WHSE_IMAGERY_AND_BASE_MAPS.GSR_AIRPORTS_SVW") %>%
324324
filter(WITHIN(little_box)) %>%
325325
collect()
326-
expect_equal(nrow(ret), 367)
326+
327+
expect_gt(nrow(ret), 350)
328+
expect_lt(nrow(ret), 400)
327329
})
328330

329331
test_that("Using BBOX works", {

0 commit comments

Comments
 (0)