Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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'
Expand Down
5 changes: 4 additions & 1 deletion R/bcdc-web-services.R
Original file line number Diff line number Diff line change
Expand Up @@ -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('<img src="', wms_legend, '">'),
position = "bottomright"
) %>%
leaflet::setView(lng = -126.5, lat = 54.5, zoom = 5)
} # nocov end

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-get-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
4 changes: 3 additions & 1 deletion tests/testthat/test-query-geodata-filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
Loading