R/mapView.R
changed.
R/options.R
changed.
938 | 938 | canvas = FALSE, |
|
939 | 939 | viewer.suppress = mapviewGetOption("viewer.suppress"), |
|
940 | 940 | ...) { |
|
941 | + | ||
942 | + | pf = mapviewGetOption("platform") |
|
943 | + | if (pf != "leaflet") { |
|
944 | + | warning( |
|
945 | + | "platform " |
|
946 | + | , "'", pf, "'" |
|
947 | + | , " currently does not support tile rendering" |
|
948 | + | , " switching to platform 'leaflet'." |
|
949 | + | , call. = FALSE |
|
950 | + | ) |
|
951 | + | mapviewOptions(platform = "leaflet") |
|
952 | + | } |
|
953 | + | ||
941 | 954 | if (mapviewGetOption("platform") == "leaflet") { |
|
942 | 955 | if (utils::file_test("-d", x)) { |
|
943 | 956 | leaflet_tiles(x = x, |
189 | 189 | "option 'fgb' cannot (yet) be used with platform '%s'. Ignoring 'fgb'." |
|
190 | 190 | , platform |
|
191 | 191 | ) |
|
192 | + | , call. = FALSE |
|
192 | 193 | ) |
|
193 | 194 | } |
|
194 | 195 | options(mapviewPlatform = platform) |
431 | 432 | ||
432 | 433 | ## fgb ---- |
|
433 | 434 | setFgb <- function(fgb) { |
|
434 | - | if (mapviewGetOption("platform") %in% c("leafgl", "mapdeck")) { |
|
435 | + | if (mapviewGetOption("platform") %in% c("leafgl", "mapdeck") && |
|
436 | + | isTRUE(fgb)) { |
|
435 | 437 | warning( |
|
436 | 438 | sprintf( |
|
437 | 439 | "option 'fgb' currently only works on platform %s. Setting fgb = FALSE" |
Files | Coverage |
---|---|
R | 41.92% |
Project Totals (26 files) | 41.92% |