Created
July 19, 2024 19:16
-
-
Save walkerke/69eff79275f748cd3f52ebd18dc60c58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(mapgl) | |
mapboxgl( | |
style = mapbox_style("streets"), | |
center = c(-87.61694, 41.86625), | |
zoom = 15.99, | |
pitch = 40, | |
bearing = 20, | |
antialias = TRUE | |
) |> | |
add_source( | |
id = "floorplan", | |
data = "https://docs.mapbox.com/mapbox-gl-js/assets/indoor-3d-map.geojson" | |
) |> | |
add_fill_extrusion_layer( | |
id = "room-extrusion", | |
source = "floorplan", | |
fill_extrusion_color = get_column("color"), | |
fill_extrusion_height = get_column("height"), | |
fill_extrusion_base = get_column("base_height"), | |
fill_extrusion_opacity = 0.5 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment