Skip to content

Quarto only renders 16 mapgl objects #170

@baslat

Description

@baslat

I have a Quarto document with multiple mapgl objects, however only the last 16 are rendered. Reprex is below. If I swap maplibre() for mapview::mapview() all 20 objects are rendered, which makes me think it's related to mapgl and not htmlwidgets. Any advice?

Reprex:

---
title: "20 test"
format: html
---

```{r}
#| echo: false
library(mapgl)
sessionInfo()

nums <- seq_along(1:20)
```

# 20 maps?
```{r}
#| results: asis
#| echo: false
nums |>
	purrr::map(\(x) {
		knitr::knit_child(
			text = c(
				"# `r x`",
				"```{r}",
				"#| echo: false",
				"maplibre()",
				"```"
			),
			envir = environment(),
			quiet = TRUE
		)
	}) |>
	unlist() |>
	cat(sep = "\n")
```

Image

Package versions from sessionInfo():

other attached packages:
[1] mapgl_0.4.4

loaded via a namespace (and not attached):
 [1] terra_1.8-86       cli_3.6.5          knitr_1.50         rlang_1.1.7       
 [5] xfun_0.56          DBI_1.2.3          KernSmooth_2.23-26 sf_1.0-23         
 [9] jsonlite_2.0.0     htmltools_0.5.9    e1071_1.7-16       rmarkdown_2.30    
[13] grid_4.5.2         evaluate_1.0.5     classInt_0.4-11    fastmap_1.2.0     
[17] base64enc_0.1-3    yaml_2.3.12        compiler_4.5.2     codetools_0.2-20  
[21] htmlwidgets_1.6.4  Rcpp_1.1.0         digest_0.6.39      class_7.3-23      
[25] magrittr_2.0.4     tools_4.5.2        proxy_0.4-28       geojsonsf_2.0.5   
[29] units_1.0-0   

output with mapview():

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions