mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

`setFog`, `setTerrain`, `setLight` should default to previous style values instead of default values

Open avpeery opened this issue 1 year ago • 0 comments

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

  1. open https://jsfiddle.net/avpeery/ag25jmts/9/
  2. click map to run setFog again with only changing color to red
  3. Only fog's color property should change, but all default values are used (this is setStyle behavior which should be different from setFog behvaior)

avpeery avatar Jul 06 '22 18:07 avpeery