Using the first link provided by @Will Hore Lacy Multiple leaflets in a grid, you can use htmltools
to create the desired view.
library(htmltool)
library(leaflet)
First, create all maps, providing different heights for each map.
# main map
# indicate height (should be related to the number of other maps : 800px = 4 maps * 200px)
metropole <- leaflet(height = "800px") %>%
addTiles() %>%
setView(lng = 2.966, lat = 46.86, zoom = 6) %>%
addControl("Métropole", position = "bottomleft")
# smaller maps :
# height is identical (200px)
reunion <- leaflet(height = "200px") %>%
addTiles() %>%
setView(lng = 55.53251, lat = -21.133165, zoom = 8) %>%
addControl("La Réunion", position = "bottomleft")
martinique <- leaflet(height = "200px") %>%
addTiles() %>%
setView(lng = -61.01893, lat = 14.654532, zoom = 8) %>%
addControl("Martinique", position = "bottomleft")
guadeloupe <- leaflet(height = "200px") %>%
addTiles() %>%
setView(lng = -61.53982, lat = 16.197587, zoom = 8) %>%
addControl("Guadeloupe", position = "bottomleft")
guyane <- leaflet(height = "200px") %>%
addTiles() %>%
setView(lng = -53.23917, lat = 3.922325, zoom = 6) %>%
addControl("Guyane", position = "bottomleft")
Create the HTML grid.
leaflet_grid <-
tagList(tags$table(width = "100%", border = "1px",
tags$tr(
tags$td(reunion, width = "30%"), # reduce first column width
tags$td(metropole, rowspan = 4) # span across the four other maps
),
tags$tr(
tags$td(martinique)
),
tags$tr(
tags$td(guadeloupe)
),
tags$tr(
tags$td(guyane)
)
)
)
browsable(leaflet_grid)
This should give something like this :
