powered by
This function adds a globe minimap control to a Mapbox GL or Maplibre map.
add_globe_minimap( map, position = "bottom-right", globe_size = 82, land_color = "white", water_color = "rgba(30 40 70/60%)", marker_color = "#ff2233", marker_size = 1 )
The modified map object with the globe minimap added.
A mapboxgl or maplibre object.
mapboxgl
maplibre
A string specifying the position of the minimap.
Number of pixels for the diameter of the globe. Default is 82.
HTML color to use for land areas on the globe. Default is 'white'.
HTML color to use for water areas on the globe. Default is 'rgba(30 40 70/60%)'.
HTML color to use for the center point marker. Default is '#ff2233'.
Scale ratio for the center point marker. Default is 1.
if (FALSE) { library(mapgl) m <- mapboxgl() %>% add_globe_minimap() m <- maplibre() %>% add_globe_minimap() }
Run the code above in your browser using DataLab