Skip to content

Commit

Permalink
fixed bug (#972), check ok
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed Dec 3, 2024
1 parent e38c73c commit 5713d4e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion R/step1_rearrange.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ step1_rearrange = function(tmel) {
sel_aux
})
if (all((!sel_aux))) {
is_aux = FALSE
#is_aux = FALSE
aux = list()
} else if (any(!sel_aux)) {
aux = aux[sel_aux]
Expand Down
2 changes: 1 addition & 1 deletion R/tm_vars.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tmapVV = function(x) {
if (is.null(x)) {
x = structure(list("value.blank"), class = "tmapOption")

} else if (is.na(x)) {
} else if (!is.list(x) && length(x) == 1 && is.na(x)) {
x = structure(list("value.const"), class = "tmapOption")
}

Expand Down
8 changes: 5 additions & 3 deletions R/tmapGridAux.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ tmapGridTilesPrep = function(a, bs, id, o) {
g = get("g", envir = .TMAP_GRID)
rlang::check_installed("maptiles")


crs = sf::st_crs(bs[[1]])

isproj = !sf::st_is_longlat(crs)
Expand Down Expand Up @@ -364,8 +363,11 @@ tmapGridGridPrep = function(a, bs, id, o) {
tmapGridTiles = function(bi, bbx, facet_row, facet_col, facet_page, id, pane, group, o) {
g = get("g", envir = .TMAP_GRID)

dt = g$bmaps_dts[[id]][[bi]]
shpTM = g$bmaps_shpTHs[[id]][[bi]]
# id is on aux level
id2 = which(names(g$bmaps_dts) == as.character(id))

dt = g$bmaps_dts[[id2]][[bi]]
shpTM = g$bmaps_shpTHs[[id2]][[bi]]
gp = list()

if (!is.null(dt)) tmapGridRaster(shpTM, dt, gp, bbx, facet_row, facet_col, facet_page, id, pane, group, o, interpolate = FALSE)
Expand Down
4 changes: 2 additions & 2 deletions man/tm_basemap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5713d4e

Please sign in to comment.