Repository navigation
Description
Before you start
- I searched the existing issues and did not find a duplicate.
- This is a bug report, not a usage question (questions belong in Discussions).
What happened?
Changing the opacity of a tile layer that is a MapLibre style does not change its icons. Its fills and lines fade, but the icons of its symbol layers stay at full strength.
Found while reviewing #1294, which makes Seamap's icons draw. It doesn't look caused by #1294: no line of its diff deals with opacity, and by reading the code, icons from a style's one sprite took the same path before.
From reading the code (not yet confirmed by a run): fills and lines are drawn into the layer's picture, which is composited at the layer's opacity (crates/tiles/src/draw.rs, draw). Symbol layers are not drawn into it. They are collected as labels (symbols::collect into Drawn.labels) and turned into PlacedLabel/PlacedIcon in crates/render/src/tiles.rs (collect, tile_label). Neither function receives the layer's opacity, and PlacedIcon (crates/render/src/lib.rs) has no alpha, so the map's label pass draws them at full strength. The label text probably does the same.
Steps to reproduce
- Add a MapLibre style whose symbol layers draw icons with Home › Add › Basemap › Add Tile Layer…, for example Open Waters' Seamap:
https://tiles.openwaters.io/seamap/style.json. Onmainthe Open Waters map isn't drawn in the web app, so use the PR preview of feat(tiles): read every sprite of a style, and the image expression #1294. - Zoom to where icons show, for example Hoek van Holland (4.08, 51.985) at 1:40,000.
- Lower the layer's opacity (
map.setTileswith"opacity", or the layer's opacity in the Layers pane). - Compare the icons with the fills and lines.
Confirmed in the web app on macOS (Brave 1.98.62), with the PR preview of #1294.
Expected behavior
A tile layer's opacity applies to everything it draws: the icons (and text) of its symbol layers fade along with its fills and lines.
How are you running RustGIS?
Web app (https://web.rustgis.app), with the PR preview of #1294.
Version
The PR preview of #1294 (web app).
Operating system, browser and graphics
macOS, Brave 1.98.62.
Sample data
Open Waters' Seamap style, https://tiles.openwaters.io/seamap/style.json.
Screenshots or logs
None.
Activity
screenshot before_0.4 for opengeos#1358
screenshot after_0.4 for opengeos#1358
screenshot after_1.0 for opengeos#1358
ninhhaidang commentedon Nov 3, 2026
I'm taking this one. My reading of the code matches the report: fills and lines are composited at the layer's opacity, while symbol layers are placed as labels and icons and never receive it. I've reproduced it with a local style (fill, line, icons and text) and have a fix ready; a pull request follows shortly.
test(tiles): collecting a tile layer's labels applies its opacity; ke…
fix(tiles): a tile layer's opacity fades its labels and icons (openge…
fix(tiles): a tile layer's opacity fades its icons and labels too (#1358