mapbox / mapbox/mapbox-gl-js

How to disable lighting effects for wms raster layer?

Open
#12,869 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs :scroll: needs discussion :speech_balloon:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Hello,

I'm experimenting with the new standard layer beta and I really like it. Except I've added a raster layer to my map and it is being affected by the lighting effect.

In all of these images, my raster layer is generating YELLOW dots (`FFFF00`), however using the new standard style they show up on the map in colors ranging from ALMOST WHITE to ALMOST BLACK.

How can I make them show up the unaltered YELLOW from the raw raster image no matter the lighting conditions?

My use case: I want to use the lighting conditions to control the theme of the basemap (e.g. easily switch from light/dark), but I want to control the colors of the data I add to the map. Does not seem possible with the dusk or night presets. Is there something I can override for my raster layer?

### lightPreset day
![image](https://github.com/mapbox/mapbox-gl-js/assets/541772/7761403e-9424-402c-9ebe-2b4fe0630c5e)

### lightPreset dusk
![image](https://github.com/mapbox/mapbox-gl-js/assets/541772/49168ab0-c042-4c06-9db0-d0135e3ae59c)

### lightPreset night
![image](https://github.com/mapbox/mapbox-gl-js/assets/541772/a733ee01-5d25-4037-a7e5-7ce0408ac5c7)

### lightPreset dawn
![image](https://github.com/mapbox/mapbox-gl-js/assets/541772/f941bb5b-a3c2-4d59-873c-833ce9090cd0)

### using dark-v11 style
![image](https://github.com/mapbox/mapbox-gl-js/assets/541772/b9cf1728-0a7a-42e8-a349-35adaaec285b)

### Raw Raster Tile
![image](https://github.com/mapbox/mapbox-gl-js/assets/541772/ba197334-f729-4f7c-8aaa-aaf3879b24a8)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the raster layer with the standard style and compare the day, dusk, night, and dawn lightPreset values against the dark-v11 style and raw raster tile shown in the issue. Trace the documented raster-layer and lighting configuration to determine whether an override exists; done means establishing a supported way to preserve the raster colors or documenting that it is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.