OptionalbasemapId of a MapLibre raster basemap layer (satellite/aerial imagery) to dim with the sun, so the ground darkens at night in step with the geometry (optional).
OptionaldateInstant to render (a Date, interpreted in UTC for solar math). Default: SOLAR NOON today at
the resolved location — the one time of day that lights any scene on Earth. Pass a date to pin
a specific instant.
OptionalenabledStart with the geo-sun system enabled. When false, the map keeps its default light/sky and the
layers their baseline look until setEnabled(true). Default true.
OptionalgradeDarken the whole map SURFACE with the sun — the basemap and, because MapLibre drapes 2D layers
onto the terrain mesh, the terrain with it. Default false.
basemapLayerId grades one RASTER layer via raster-brightness-max, which covers a
satellite basemap and nothing else: a vector style is dozens of fill/line/symbol layers with no
brightness property between them. On such a style the ground stays at full daylight while the
3D layers darken, and under 3D terrain that reads as the terrain ignoring the time of day.
This inserts a world-covering fill under the first symbol layer (labels stay legible) whose opacity follows the sun. Works on any style. Additive to basemapLayerId — on raster imagery, grading the imagery itself looks better, and both can run together.
OptionalhillshadeId of a MapLibre hillshade layer to drive from the sun, so terrain relief shades with the scene (optional).
OptionallayersBitruvius 3D layers to relight — anything implementing SunLightable (mesh / point-cloud / splat layers). More can be added later with Atmosphere.addLayer.
OptionallocationWhere to evaluate the sun; see LocationOption. Default 'map-center'.
The MapLibre map to drive. You own its lifecycle; call setTimeOfDay after the
map's load event so the style is ready for setLight / setSky.
OptionalshadowsDrive real cast shadows on the supplied layers (Phase 2).
Default false.
OptionalsyncDrive map.setLight + map.setSky from the sun (the "visual sync" that lights the basemap and
fill-extrusions). Default true.
Options for setTimeOfDay. Only
mapis required; everything else has a default.