Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ddfcaba
feat(layout): section lines on a map frame (#2863 part 1)
elpidiofilho Nov 24, 2026
7f50ff7
fix(layout): a section line on a frame whose map is missing is said; …
elpidiofilho Nov 24, 2026
83eb3d9
refactor(layout): section lines' Format pane rows move to a part of t…
elpidiofilho Nov 24, 2026
faa1f70
Merge main into feat/2863-layout-section-lines
elpidiofilho Nov 24, 2026
ea5a1c4
fix(layout): layout.addElement refuses what a section doesn't read
elpidiofilho Nov 25, 2026
cb66043
Merge main into feat/2863-layout-section-lines
elpidiofilho Nov 25, 2026
f213416
fix(layout): a removed section line takes no change; a line missing f…
elpidiofilho Nov 25, 2026
56facbf
fix(layout): spaces round a section name are not counted as cut
elpidiofilho Nov 25, 2026
a07a5f5
Merge main into feat/2863-layout-section-lines
elpidiofilho Nov 26, 2026
ff1d9b2
test(capabilities): a sample for layout-section
elpidiofilho Nov 26, 2026
b9183f5
Merge main into feat/2863-layout-section-lines
elpidiofilho Nov 26, 2026
a0e2f86
Merge main into feat/2863-layout-section-lines
elpidiofilho Nov 26, 2026
d06ffe6
fix(layout): a report says the section lines its layout page can't draw
elpidiofilho Nov 27, 2026
985d92d
test(layout): each section test under its own doc comment
elpidiofilho Nov 27, 2026
0ff7ae3
Merge main into feat/2863-layout-section-lines
elpidiofilho Nov 27, 2026
6bdc69e
test(layout): a grid or an extent indicator refuses a section's name
elpidiofilho Nov 27, 2026
6453d3d
Merge main into feat/2863-layout-section-lines
elpidiofilho Nov 27, 2026
e1812b5
fix(layout): section names on short lines, the credit beside them, an…
elpidiofilho Nov 27, 2026
fd9e7db
Merge main into feat/2863-layout-section-lines
elpidiofilho Nov 27, 2026
dc800d2
fix(layout): one report notice for the section lines its layouts leav…
elpidiofilho Nov 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/engine/command-surface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ layer.transparency layer? value
layer.visibility layer? visible?
layer.zoomTo layer?
layout.activate name layout
layout.addElement layout? kind frame? of? text? size? color? bold? italic? align? letterSpacing? rotation? wrap? valign? lineSpacing? case? font? fallback? title? allClasses? hideOther? showNoData? exclude? columns? textSize? showLayerNames? orientation? ticks? tickSide? reverse? fill? width? radius? dash? dir? head? angle? length? image? path? layer? field? label? group? statistic? order? bars? other? stack? values? decimals? barColor? classes? labelAlign? mirror? max? hideLabels? barOutline? rows? step? type? crs? short? mgrs? labels? style? tickLength? format? hemisphere? edges? labelOrientation? labelSize? off? outline? units? divisions? subdivisions? divisionsBeforeZero? labelPosition? unitLabel? unitLabelPosition? fit? x? y? w? h? background?
layout.addElement layout? kind frame? of? text? size? color? bold? italic? align? letterSpacing? rotation? wrap? valign? lineSpacing? case? font? fallback? title? allClasses? hideOther? showNoData? exclude? columns? textSize? showLayerNames? orientation? ticks? tickSide? reverse? fill? width? radius? dash? dir? head? angle? length? image? path? layer? field? label? group? statistic? order? bars? other? stack? values? decimals? barColor? classes? labelAlign? mirror? max? hideLabels? barOutline? rows? step? type? crs? short? mgrs? labels? style? tickLength? format? hemisphere? edges? labelOrientation? labelSize? off? name? direction? at? outline? units? divisions? subdivisions? divisionsBeforeZero? labelPosition? unitLabel? unitLabelPosition? fit? x? y? w? h? background?
layout.addFrame layout? shape? points? map? x? y? w? h?
layout.arrange layout? element to
layout.arrangement favourite? save? arrangement? remove?
Expand All @@ -304,7 +304,7 @@ layout.save layout? path
layout.series layout? layer nameField? frame? margin? off?
layout.seriesPage layout? page
layout.seriesRefresh layout?
layout.update layout? element x? y? w? h? name? visible? locked? text? size? color? bold? italic? align? letterSpacing? rotation? wrap? valign? lineSpacing? case? font? fallback? title? allClasses? hideOther? showNoData? exclude? labels? columns? textSize? showLayerNames? orientation? ticks? tickSide? reverse? style? fill? outline? radius? width? dash? dir? head? angle? length? units? divisions? subdivisions? divisionsBeforeZero? labelPosition? unitLabel? unitLabelPosition? fit? map? scale? center? bearing? pitch? grid? extentIndicator? border? layer? field? label? group? statistic? order? bars? other? stack? values? decimals? barColor? classes? labelAlign? mirror? max? barOutline? hideLabels? rows? background?
layout.update layout? element x? y? w? h? name? visible? locked? text? size? color? bold? italic? align? letterSpacing? rotation? wrap? valign? lineSpacing? case? font? fallback? title? allClasses? hideOther? showNoData? exclude? labels? columns? textSize? showLayerNames? orientation? ticks? tickSide? reverse? style? fill? outline? radius? width? dash? dir? head? angle? length? units? divisions? subdivisions? divisionsBeforeZero? labelPosition? unitLabel? unitLabelPosition? fit? map? scale? center? bearing? pitch? grid? extentIndicator? border? section? layer? field? label? group? statistic? order? bars? other? stack? values? decimals? barColor? classes? labelAlign? mirror? max? barOutline? hideLabels? rows? background?
locator.find locator? text limit? zoom?
map.activate name
map.addTiles url kind? name? bounds? attribution? minZoom? maxZoom? tileSize? singleImage? tms? subdomains? layers? styleLayers? opacity? blend? resampling? overlay? top? replace? id? view? start? end? unit? interval? dates? legend? connection?
Expand Down
21 changes: 13 additions & 8 deletions crates/engine/src/cmd/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ use rustgis_map::layout::{
FrameShape, GRID_LABEL_PT, Grid, GridEdges, GridKind, GridStyle, Guides, LAYOUT_TEXT_SIZE, LINE_SPACING, LayerNames, Layout, LegendFit,
LineDir, LineHead, MAX_CHART_BARS, MAX_CHART_DECIMALS, MAX_CHART_OUTLINE_WIDTH, MAX_COLORBAR_TICKS, MAX_GRID_WIDTH, MAX_GUIDES,
MAX_LEGEND_COLUMNS, MAX_LEGEND_LABEL_CHARS, MAX_LEGEND_LABELS, MAX_LINE_SPACING, MAX_SCALE_BEFORE_ZERO, MAX_SCALE_DECIMALS,
MAX_SCALE_DIVISIONS, MAX_SCALE_SUBDIVISIONS, MAX_TICK_MM, MAX_UNIT_LABEL_CHARS, MIN_ELEMENT_MM, MIN_LINE_SPACING, MapSeries,
Orientation, PAGES, SCALE_BAR_TEXT_PT, ScaleBarFit, ScaleBarStyle, ScaleLabelPosition, ScaleUnits, TextAlign, TextCase, TextVAlign,
TickSide, UnitLabelPosition, fit_scale, line_angle, line_at_angle, line_length,
MAX_SCALE_DIVISIONS, MAX_SCALE_SUBDIVISIONS, MAX_SECTIONS, MAX_TICK_MM, MAX_UNIT_LABEL_CHARS, MIN_ELEMENT_MM, MIN_LINE_SPACING,
MapSeries, Orientation, PAGES, SCALE_BAR_TEXT_PT, ScaleBarFit, ScaleBarStyle, ScaleLabelPosition, ScaleUnits, Section, SectionLine,
TextAlign, TextCase, TextVAlign, TickSide, UnitLabelPosition, fit_scale, line_angle, line_at_angle, line_length,
};
use rustgis_map::report::StatKind;
use rustgis_map::symbology::{Dash, MAX_DASH_STEP, MAX_DASH_STEPS};
Expand Down Expand Up @@ -180,12 +180,12 @@ pub fn commands() -> Vec<C> {
C::new("layout.addElement", "Add Element", "Publish › Map Surrounds", add_element).inputs(element_inputs).roles(&[]).effects(crate::policy::Effects::NONE.with(crate::policy::Effect::Files)).params(
concat!(
r##"{"layout"?, "##,
r##""kind": "northArrow"|"scaleBar"|"legend"|"colorbar"|"text"|"dynamicText"|"picture"|"table"|"chart"|"rectangle" (a neatline framing the page unless any of x, y, w, h is given)|"ellipse"|"circle"|"line"|"arrow"|"extentIndicator"|"grid", "##,
r##""kind": "northArrow"|"scaleBar"|"legend"|"colorbar"|"text"|"dynamicText"|"picture"|"table"|"chart"|"rectangle" (a neatline framing the page unless any of x, y, w, h is given)|"ellipse"|"circle"|"line"|"arrow"|"extentIndicator"|"grid"|"section" (a section line over a map frame, named at both ends, A and A', up to 26 a frame; as a grid or an extentIndicator, it adds no element: the reply's "element" is its frame, the one layout.update changes it on with "section", and "section" its name), "##,
r##""frame"?: element id (default: the first map frame), "##,
r##""of"?: frame id (extentIndicator, which also takes "color" and "width" in points, default red and 2), "##,
r##""text"? (a text's words; {count:Layer}, {sum:Layer:field}, {mean:Layer:field}, {min:Layer:field} and {max:Layer:field} show the layer's figure, as {scale} shows the scale: of the first map frame's map, over the features the layer's definition query keeps, with the layout's decimal mark; one with no figure shows as written and says why), "##,
r##""size"?, "##,
r##""color"?: "#RRGGBB"|"#RRGGBBAA" (text, dynamicText, line, arrow, rectangle, ellipse, circle: its outline; extentIndicator; grid; scaleBar; legend, colorbar, table, chart: the ink of its text and lines, default #222222, a chart's bars and a colorbar's colours keeping theirs, and a table drawn without its white cells; refused for other kinds), "##,
r##""color"?: "#RRGGBB"|"#RRGGBBAA" (text, dynamicText, line, arrow, rectangle, ellipse, circle: its outline; extentIndicator; grid; section, default #A8431F; scaleBar; legend, colorbar, table, chart: the ink of its text and lines, default #222222, a chart's bars and a colorbar's colours keeping theirs, and a table drawn without its white cells; refused for other kinds), "##,
r##""bold"?: bool (text), "##,
r##""italic"?: bool, "##,
r##""align"?: "left"|"center"|"right", "##,
Expand All @@ -210,9 +210,9 @@ pub fn commands() -> Vec<C> {
r##""tickSide"?: "below"|"above"|"right"|"left" (colorbar), "##,
r##""reverse"?: bool (colorbar: high values first), "##,
r##""fill"?: "#RRGGBBAA" (rectangle, ellipse, circle, northArrow; scaleBar: the alternating bar's light divisions, default white; refused for other kinds), "##,
r##""width"?: outline width in points (rectangle, ellipse, circle; 0 for none) or line width in points (line, grid), "##,
r##""width"?: outline width in points (rectangle, ellipse, circle; 0 for none) or line width in points (line, grid; section, 0.1 to 20, default 1.5), "##,
r##""radius"?: mm, 0 to 50 (rectangle: rounded corners), "##,
r##""dash"?: [points, …] (line, arrow, and a rectangle's, ellipse's or circle's outline: dash, gap, … in turn, as layer.lineStrokes takes it, at most 8, each 0 to 500; an arrow's heads stay solid; [] or null for solid; refused, null too, for other kinds), "##,
r##""dash"?: [points, …] (line, arrow, section, and a rectangle's, ellipse's or circle's outline: dash, gap, … in turn, as layer.lineStrokes takes it, at most 8, each 0 to 500; an arrow's heads stay solid; [] or null for solid; refused, null too, for other kinds), "##,
r##""dir"?: "horizontal"|"vertical"|"falling"|"rising" (line), "##,
r##""head"?: "none"|"end"|"start"|"both" (line; default "end" for an arrow), "##,
r##""angle"?: degrees anticlockwise from pointing right, centred on the page unless x or y is given (line, arrow; it sets the box and the direction, so w, h and dir are not used with it), "##,
Expand Down Expand Up @@ -252,6 +252,9 @@ pub fn commands() -> Vec<C> {
r##""labelOrientation"?: "horizontal"|"vertical", "##,
r##""labelSize"?: points, 4 to 100 (its labels, their room from the frame's edge and MGRS squares' names following; default 8; null gives it back; refused outside that range, and for other kinds unless null), "##,
r##""off"?: bool (grid; options not given keep the grid's), "##,
r##""name"?: a section's name, up to 20 characters, its frame's only one of that name (section, default the first free letter; a grid and an extent indicator refuse it, other kinds say they ignore it), "##,
r##""direction"?: "horizontal" (the default)|"vertical" (section: across the whole frame, straight on the page, named at its left and right ends or its top and bottom ones; refused for other kinds), "##,
r##""at"?: [longitude, latitude] (section: the place the line runs through and keeps to when the frame is moved, turned or rescaled, default the frame's centre; a line whose place is outside the frame isn't drawn, which a notice and exports say; refused for other kinds), "##,
r##""outline"?: "#RRGGBB" (northArrow, or a rectangle's, ellipse's or circle's outline instead of color; refused for other kinds), "##,
r##""units"?: "auto"|"kilometers"|"meters"|"miles"|"feet", "##,
r##""divisions"?: 1..10, at most 10 with divisionsBeforeZero together, more refused (scaleBar, whose "color" is its lines, dark divisions and labels, default #222222), "##,
Expand All @@ -265,7 +268,7 @@ pub fn commands() -> Vec<C> {
r##""y"?, "##,
r##""w"?, "##,
r##""h"?: mm, "##,
r##""background"?: {"fill"?: "#RRGGBB"|"#RRGGBBAA" (default white), "outline"?: colour (default #222222), "width"?: the outline's points (default 0, none), "radius"?: mm, its corners (0 to 50), "padding"?: mm it reaches past the box on every side (0 to 50)} | null (a box drawn behind the element, turned with a turned text; none by default; a map frame takes none, so it is refused for grid and extentIndicator)}"##,
r##""background"?: {"fill"?: "#RRGGBB"|"#RRGGBBAA" (default white), "outline"?: colour (default #222222), "width"?: the outline's points (default 0, none), "radius"?: mm, its corners (0 to 50), "padding"?: mm it reaches past the box on every side (0 to 50)} | null (a box drawn behind the element, turned with a turned text; none by default; a map frame takes none, so it is refused for grid, extentIndicator and section)}"##,
),
),
C::new("layout.update", "Element Properties", "Publish › Element", update).inputs(update_inputs).roles(&[]).effects(crate::policy::Effects::NONE.with(crate::policy::Effect::Files)).params(
Expand Down Expand Up @@ -332,6 +335,7 @@ pub fn commands() -> Vec<C> {
r##""grid"?: {grid options as in layout.addElement} | false (map frame; a grid's "labelSize" goes in it, and is refused outside it unless null), "##,
r##""extentIndicator"?: {"color"?, "width"?: points} | false (map frame: its extent indicator's style, or removes it), "##,
r##""border"?: {"color"?: "#RRGGBB"|"#RRGGBBAA", "width"?: points, 0 to 20, 0 for none} | null (map frame: the outline along its shape, default #303030 and 0.8, the keys not given keeping theirs; null gives the default back; refused for other elements), "##,
r##""section"?: {"name": the section line it changes, "newName"?, "direction"?, "at"?, "color"?, "width"?, "dash"? ([] or null for solid), as in layout.addElement, the keys not given keeping theirs, "remove"?: true to remove it} (map frame; refused for other elements), "##,
r##""layer"?: (colorbar: "" for the top visible raster with a colour scale, not drawn by classes), "##,
r##""field"?, "##,
r##""label"?, "##,
Expand Down Expand Up @@ -546,6 +550,7 @@ fn frame_kind(s: &Session, map: &str, w: f64, shape: FrameShape) -> ElementKind
scale,
shape,
grid: None,
sections: Vec::new(),
extent_of: None,
extent_color: rustgis_map::layout::INDICATOR_COLOR,
extent_width: rustgis_map::layout::INDICATOR_WIDTH,
Expand Down
Loading
Loading