add_h3j_source | R Documentation |
Add a hexagon source from the H3 geospatial indexing system.
add_h3j_source(map, id, url)
map |
A map object created by the |
id |
A unique ID for the source. |
url |
A URL pointing to the vector tile source. |
https://h3geo.org, https://github.com/INSPIDE/h3j-h3t
url = "https://inspide.github.io/h3j-h3t/examples/h3j/sample.h3j"
maplibre(center=c(-3.704, 40.417), zoom=15, pitch=30) |>
add_h3j_source("h3j_testsource",
url = url
) |>
add_fill_extrusion_layer(
id = "h3j_testlayer",
source = "h3j_testsource",
fill_extrusion_color = interpolate(
column = "value",
values = c(0, 21.864),
stops = c("#430254", "#f83c70")
),
fill_extrusion_height = list(
"interpolate",
list("linear"),
list("zoom"),
14,
0,
15.05,
list("*", 10, list("get", "value"))
),
fill_extrusion_opacity = 0.7
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.