-
Notifications
You must be signed in to change notification settings - Fork 506
Open
Description
Simple leaflet maps are no showing on the Rstudio Viewer pane, but I can open the generated html from the tmp folder. This only happens with the base map, other Polygons added are showing.
library(leaflet)
leaflet( ) %>% addTiles()
library(geobr)
library(dplyr)
library(leaflet)
biomas <- geobr::read_biomes()
pal <- colorFactor(
palette = "Set2",
domain = biomas$name_biome
)
leaflet(data = biomas) %>%
addTiles() %>%
addPolygons(
fillColor = ~pal(name_biome),
weight = 1,
opacity = 0.5,
color = "white",
dashArray = "3",
fillOpacity = 0.4,
highlight = highlightOptions(
weight = 2,
color = "#666",
dashArray = "",
fillOpacity = 0.7,
bringToFront = TRUE
),
label = ~name_biome
) %>%
addLegend(
pal = pal,
values = ~name_biome,
title = "Biomas do Brasil",
position = "bottomright"
)
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 4.3
year 2025
month 02
day 28
svn rev 87843
language R
version.string R version 4.4.3 (2025-02-28)
nickname Trophy Case
RStudio
2024.12.1 Build 563
leaflet 2.2.2
Metadata
Metadata
Assignees
Labels
No labels


