mapbox-gl-js
mapbox-gl-js copied to clipboard
`setFog`, `setTerrain`, `setLight` should default to previous style values instead of default values
setLight, setFog and setTerrain should operate the same way. The expectation is that these methods will use the previous fog, light, or terrain values if already set when not set in the current call. Currently, setFog shares the same behavior as setStyle in which default style spec values are used in these cases.
mapbox-gl-js version: Main
browser: Any
Steps to Trigger Behavior
- open https://jsfiddle.net/avpeery/ag25jmts/9/
- click map to run setFog again with only changing color to red
- Only fog's color property should change, but all default values are used (this is
setStylebehavior which should be different fromsetFogbehvaior)