UNDP-Data / geohub

GeoHub Frontend Application
https://geohub.data.undp.org
BSD 3-Clause "New" or "Revised" License
44 stars 8 forks source link

[BUG] old raster map style will be changed after just opening style editor #4300

Open JinIgarashi opened 1 month ago

JinIgarashi commented 1 month ago

Bug Description

some old raster map style is changed after opening style editor.

Bug Reproduction

Bug Impact

No response

Bug Screenshots

No response

Bug References

No response

Bug System Information

JinIgarashi commented 1 month ago

I found raster color legend was changed after subscribing rescale store. Looks like some changes on RasterRescale component will trigger the event in RasterClassifyLegend to change map style.

https://github.com/UNDP-Data/geohub/blob/9f9be6b1bf517a18452c4e33c05f81cf4304c6c0/sites/geohub/src/components/maplibre/raster/RasterClassifyLegend.svelte#L283-L287

JinIgarashi commented 1 month ago

this map #192's raster dataset has statistics ranged 0.40465450286865234 to 1.2871990203857422

However, this saved map style is set to 0.36 to 1.4. Because of this difference, it looks like always being updated when correct rescale values is set in editor.

since the latest map with raster looks working well, maybe we can just close this issue...