Skip to content

Layers/Symbology panes draw triangle, diamond and star marks as circles #3667

Done

Description

@dbdabell

What happens

On a point layer whose classes have their own marks (stacked strokes of markers, set in the Symbology pane's Marks section or with layer.lineStrokes and a value), the map draws each mark in its own shape, but the desktop UI's previews don't:

  • Triangle, diamond and star marks show as circles in the Layers pane's legend rows and in the Symbology pane's Marks preview.
  • A square mark shows as a square but is never turned: a square with "angle": 20 is turned on the map and upright in both panes.
  • A hash mark over a diamond shows over a circle.

Seen in RustGIS 0.9.0 on Windows desktop, and on main (8f1c5ec).

Steps to reproduce

layer.addDataText={"fileName":"Points.csv","text":"name,type,lon,lat\nA,triangle,10,5\nB,diamond,11,5\nC,star,12,5\nD,square 20°,13,5\n"}
layer.symbology={"layer":"Points","type":"unique","field":"type"}
layer.lineStrokes={"layer":"Points","value":"triangle","strokes":[{"color":"#1565C0","width":0.8,"markers":{"mark":"triangle","size":12,"outline":"#FFFFFF"}}]}
layer.lineStrokes={"layer":"Points","value":"diamond","strokes":[{"color":"#2E7D32","markers":{"mark":"diamond","size":12}},{"color":"#FFFFFF","width":1.5,"markers":{"mark":"hash","size":12,"angle":45,"rotate":false}}]}
layer.lineStrokes={"layer":"Points","value":"star","strokes":[{"color":"#C62828","width":0.8,"markers":{"mark":"star","size":14,"outline":"#000000"}}]}
layer.lineStrokes={"layer":"Points","value":"square 20°","strokes":[{"color":"#6D4C41","width":0.8,"markers":{"mark":"square","size":11,"outline":"#000000","angle":20}}]}

Expand Points in the Layers pane, open Symbology, and in Marks › Marks for pick triangle, then star.

Expected

Each row's patch and the Marks preview show the mark the map draws: a blue triangle, a green diamond under a white 45° hash, a red star, and a brown square turned 20°.

Actual

The triangle, diamond and star classes show circles (the diamond's hash is drawn over a circle), and the square 20° class shows an upright square. The map is right.

Cause

marker_preview in crates/ui-egui/src/panes.rs draws one mark. It handles LineMark::Hash, Marker::Square (upright) and Marker::Char, and its catch-all LineMark::Marker(_) arm draws circle_filled. Every patch of a point layer with marks goes through it (patch_sized → marks_preview → marker_preview). That covers the Layers pane's rows and size rows, the Symbology class rows of repeated values, the symbol editor's swatch, and the Marks preview. So do markers along a line in the stroke editor's preview. The plain-symbol branch of patch_sized (no marks) draws squares, triangles and diamonds separately, with its own proportions (a triangle from −r to +0.8r rather than the map's −1.1r to +0.75r), and stars as circles.

The layout legend is not affected. layout/swatch.rs::point_swatch draws through point_marks::draw, so it uses the map's own marker_path.

Related

Activity

  1. added a commit that references this issue on Dec 3, 2026
    c1a81bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions