Creates the surfaces on a map, drawn as soon as the map is ready.
The map to texture.
Optionalconfig: GLSurfacesConfig
The knobs to start with.
Replaces the whole configuration. An empty object has every knob take its default.
Use it, and updateConfig, for a look your code writes: the type is the check, and the values
are not checked again. For values held as data, the SDK's setKnobs checks each against
glSurfacesKnobCatalogue and sets them by id, and its getKnob reads a knob's value in
force, the map's own or the default when unset.
updateConfig merges one level deep, and every surface sits in the one part surfaces, so
passing surfaces replaces the knobs of every surface:
updateConfig({ surfaces: { roads: { intensity: 0 } } }) also unsets those of the water, the
forest and the others. To change some knobs and keep the others, use the SDK's setKnobs:
setKnobs(surfaces, glSurfacesKnobCatalogue, { 'surfaces.roads.intensity': 0 }).
Returns the knobs set, as a plain serializable copy.
Whether the feature is set to be shown: the visible knob, true unless set.
ProtectedlookA knob's value from a resolved look. The map's light turns with the bearing by fractions of a
degree, which the features draw with; the knob reports whole degrees, a value setKnob takes back.
Takes the surfaces and the trees off the map: removes their layers, with the WebGL resources
they hold, and stops following the map's style. Call it when your app drops the surfaces but
keeps the map. A removed GLSurfaces can't be shown again; create a new one instead.
Unsets every knob.
Shows or hides the feature. Stored as visible in the configuration.
Changes the given knobs and keeps the others, one level deep.
Textures the surfaces of the map's style with WebGL materials, and grows 3D trees on its green: water that ripples in the wind, mirrors the sky and rolls in onto open shores, glaciers, tree crowns lit by the sun over forests, lawns, meadows and scrub, field parcels over farmland, dunes, mud flats, shingle, bare rock, paving, built-up ground and asphalt.
Remarks
Public Preview until the plugin's 1.0.0 release.
seasonknob, from the style's colours. A colour knob set for one shade of a surface, such as the cereal fields, replaces it.trees.species.<kind>.shareFactorknob scales. They keep off the roads, paths, railways and streams through a wood, which show over the crowns in front of them.view.lightknobs, so it lights the crowns, the trees and the dunes from where the 3D buildings are lit. Until then, it is the style's theme's sun, 215°/30° by day and the moon at 135°/35° by night, and the day sun of the 3D buildings, 215°/35°, over satellite imagery.wind.speedFactorto 0 to hold them still and let the map rest.Example