bcdc_preview: Get preview map from the B.C. Web Map Service

View source: R/bcdc-web-services.R

bcdc_previewR Documentation

Get preview map from the B.C. Web Map Service

Description

Note this does not return the actual map features, rather opens an image preview of the layer in a Leaflet map window

Usage

bcdc_preview(record)

Arguments

record

either a bcdc_record object (from the result of bcdc_get_record()), a character string denoting the name or ID of a resource (or the URL) or a BC Geographic Warehouse (BCGW) name.

It is advised to use the permanent ID for a record or the BCGW name rather than the human-readable name to guard against future name changes of the record. If you use the human-readable name a warning will be issued once per session. You can silence these warnings altogether by setting an option: options("silence_named_get_data_warning" = TRUE) - which you can set in your .Rprofile file so the option persists across sessions.

Examples


try(
  bcdc_preview("regional-districts-legally-defined-administrative-areas-of-bc")
)

try(
  bcdc_preview("points-of-well-diversion-applications")
)

# Using BCGW name
try(
  bcdc_preview("WHSE_LEGAL_ADMIN_BOUNDARIES.ABMS_REGIONAL_DISTRICTS_SP")
)


bcdata documentation built on March 31, 2023, 8:10 p.m.