I am using a WMS service from GeoServer to load satellite imagery on Mapbox, but the loaded imagery has uneven colors. What could be the cause of this issue?If you have any solutions about this problem, please help me.
Asked
Active
Viewed 16 times
1 Answers
0
You (or mapbox) have requested tiles rather than a single WMS image so for each image GeoServer seems to have applied the default raster style which makes a contrast stretch for the range of the image.
To fix this you can either request the whole map in one image or you can provide a fixed raster style with a pre-defined colour map so that each tile shares a common colormap.

Ian Turton
- 10,018
- 1
- 28
- 47
-
`map.on('load', () => { map.addLayer({ id: 'wms-layer', type: 'raster', source: { type: 'raster', tiles: ["http://localhost:8088/geoserver/cesiumTest1/wms?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&width=256&height=256&layers=cesiumTest1:merge_clip&TRANSPARENT=true"] } }); });` Thanks for your anwser, the above is my request url of wms. How should I request the whole map in one image? Previewing in geoserver is normal, but using mapbox gl to load is bad. – Ninja Jul 27 '23 at 01:53