Closed stephhazlitt closed 6 years ago
I remember now why I had that - in case we added a layer to bcmaps.rdata
and we hadn't updated bcmaps
on CRAN yet, there would be a layer that you could get via get_layer("new_layer")
but new_layer()
wouldn't work (until we updated bcmaps
with the new shortcut function.
But I agree it's still confusing. What about keeping the shortcut_function
column but make it TRUE/FALSE
to indicate that the shortcut function exists (or not)?
> available_layers()
Item Title shortcut_function
1 airzones British Columbia Air Zones TRUE
2 bc_bound BC Boundary TRUE
3 bc_bound_hres BC Boundary - High Resolution TRUE
4 ecoprovinces British Columbia Ecoprovinces TRUE
5 ecoregions British Columbia Ecoregions TRUE
6 ecosections British Columbia Ecosections TRUE
7 gw_aquifers British Columbia's developed ground water aquifers TRUE
8 hydrozones Hydrologic Zone Boundaries of British Columbia TRUE
9 municipalities British Columbia Municipalities TRUE
10 nr_areas British Columbia Natural Resource (NR) Areas TRUE
11 nr_districts British Columbia Natural Resource (NR) Districts TRUE
12 nr_regions British Columbia Natural Resource (NR) Regions TRUE
13 regional_districts British Columbia Regional Districts TRUE
14 water_districts British Columbia's Water Management Districts TRUE
15 water_precincts British Columbia's Water Management Precincts TRUE
16 watercourses_15M British Columbia watercourses at 1:15M scale TRUE
17 watercourses_5M British Columbia watercourses at 1:5M scale TRUE
18 wsc_drainages Water Survey of Canada Sub-Sub-Drainage Areas TRUE
Perfect, and a good reason for having it there.
Return for bcmaps::available_layers() is a list of map layer names and titles and then a list of shortcut_function() names—which are the same as the map layer name. Remove return of shortcut names and update documention.