Repository navigation
Description
What problem does this solve?
Newly added layers can be hidden beneath existing layers instead of appearing on top. In the World Atlas startup project, the Countries layer obscures an added WMS: its imagery is visible only as a tint, with labels and roads unreadable. Under an opaque layer covering the same area, the added service layer is not visible at all.
The original question has a direction from @giswqs: Maintainer comment
This feature request tracks that behavior rather than a warning or a workaround specific to the sample project.
Proposed solution
Place newly added layers at the top of the drawing order, matching the GeoLibre behavior requested by @giswqs. Apply this consistently to feature, raster, and tile/service layers, rather than inserting them by geometry rank or into a tile-only stack below all map layers.
- A newly added layer should draw above the existing data layers, including the World Atlas sample layers, without requiring the user to hide them first.
- The Layers pane should show the same order the map actually draws. A tile/service layer must not appear to be on top while still rendering below feature or raster layers.
- Keep the project basemap as the background; adding a data or service layer is distinct from choosing a basemap.
- Review the Add Tile Layer Overlay wording alongside the change. The current description, “a transparent layer kept on top, such as labels or roads”, must agree with the resulting behavior rather than silently meaning only above other tile layers.
This changes insertion/drawing behavior in the existing add-layer workflows; it does not need a new ribbon destination.
Acceptance criteria
- Adding the GEBCO WMS below to the World Atlas project places it above Cities, Rivers, Lakes and Countries in both the Layers pane and the rendered map. No sample layer needs to be disabled.
- Adding a tile/service layer over an existing opaque raster draws the new layer above that raster.
- Newly added feature layers, including WFS/OGC API layers, go above existing data layers regardless of point/line/polygon geometry. Newly added rasters, including WCS coverages, follow the same rule.
- Adding another layer places that layer above the previously added layer without changing the relative order of the layers already present.
- The basemap remains beneath the data layers, and the Overlay description matches its actual semantics.
Reproduction of the original problem
Reported on the desktop app built from source, v0.3.0 (42859ba), macOS 27 arm64:
-
Open RustGIS with the World Atlas sample.
-
Open Home › Add › Basemap › Add Tile Layer… and use:
https://wms.gebco.net/mapserv?request=getmap&service=wms&version=1.3.0&layers=GEBCO_LATEST&crs=EPSG:3857&format=image/png&width=256&height=256&bbox={bbox-epsg-3857} -
Tick Overlay (a transparent layer kept on top, such as labels or roads) and select Add.
-
The new row appears beneath Cities, Rivers, Lakes and Countries, above Basemap · Ocean. Countries still covers the service imagery.
-
Hide the sample layers: the service imagery becomes fully visible.
Add Service Layer for WMS exhibits the same problem. The original report also notes that WFS/OGC API features are inserted by geometry rank and WCS rasters below feature layers.
Original screenshots, generated with the headless UI screenshot tool:
Implementation context from the original report
At the reported revision, the renderer composites tile layers before map layers (crates/render/src/lib.rs); overlay: true only orders a layer above other tile layers (crates/engine/src/cmd/service.rs and tiles.rs); and feature insertion uses geometry rank (crates/map/src/lib.rs). The report also notes that layer.move cannot address a tile layer, while the tile row menu only reorders within the tile stack. Moving a row alone will therefore not solve the rendering limitation.
These are starting points from the original investigation, not a prescribed implementation. Verify the changed behavior on the real rendered map as well as the Layers pane.
Estimated scope
Not sure.
Alternatives considered
- Hide Countries or all sample layers: works around the startup example but not the general ordering problem.
- Warn that the added layer draws beneath an existing layer: explains the problem without implementing the requested topmost insertion behavior.
- Change only the Overlay text: removes ambiguity but still leaves newly added service layers hidden.


Activity
giswqs commentedon Oct 24, 2026
We should probably must match GeoLibre behavior. Newly added layers are placed on top.
[-][Question]: A new project hides WMS layers under Countries[/-][+][Feature]: Add newly added layers to the top of the drawing order[/+]pick2510 commentedon Oct 27, 2026
I'm taking this one.
Plan, general for every way a layer is added:
Tests pin the old order of saved projects and check each way of adding a layer; I'll look at the rendered map too, not only the pane.
feat(layers): new layers go on top, web tile layers take a place amon…