'Mapbox - console.warning = "The sun direction is attached to a light with viewport anchor, lighting may behave unexpectedly"

the mapbox docs talk about setting the light anchor to 'map', but where exactly do you do this? Mapbox Docs setLight()



Solution 1:[1]

To set the light anchor to map at run time, you would do:

map.setLight({ anchor: 'map' });

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Steve Bennett