You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: an extent indicator joins its outline across gaps on a custom projection, and stops short of a globe's rim #2369
I searched the existing issues and did not find a duplicate.
This is a bug report, not a usage question.
What happened?
A layout's extent indicator (the outline of one map frame drawn on another, as a Publication Layout's locator shows it) has two remaining flaws in how it follows the outlined frame's edges. Both are in frame_outline_lonlat (crates/render/src/layout.rs); found in review of #2355.
A flat frame on a custom projection can be outlined with a chord. Each edge is sampled 16 times and read back to longitude/latitude. On a custom projection, a sample outside the projection's domain gives no position, and it is dropped without leaving a gap, so the samples on either side are joined by a straight line across the frame it is drawn on. Frames on the globe already leave a gap there (fix(layout): size and centre a globe locator so it fits its circle near a pole (#2348) #2355); the flat path still doesn't. This already happens on main.
On a frame on the globe seen in part, the outline stops short of the disc's rim. Where an edge runs off the disc, the outline breaks at the last of its 16 samples still on the disc, so it can end up to a sixteenth of the edge short of the rim (about 2.5 mm on a 40 mm frame).
Steps to reproduce
For the first: a map on a custom projection whose domain doesn't cover the whole world (for example one limited to a hemisphere), and a layout with a map frame on it whose edge runs past that domain, outlined by an extent indicator on another frame.
For the second: a map on the Globe projection, a map frame zoomed so that the disc is taller than the frame but narrower than its diagonal (its sides off the disc), outlined by an extent indicator on a globe locator.
Export the layout and look at the outline.
Expected behavior
The outline breaks where the frame's edge leaves the projection's domain, as it does on the globe, with no line across the map.
The outline reaches the disc's rim where the edge leaves it, for example by bisecting each transition between a sample on the disc and one off it.
Each fix needs a test: a custom projection whose domain cuts a frame edge (no line between the two sides of the cut), and a globe frame seen in part (the outline's ends on the rim).
A third case for this issue, from the review of #2355: a frame on the globe around a pole, outlined on a flat frame. Its ring spans a whole turn of longitude, and outline_lonlat moves a globe frame's ring as a whole to the flat frame's side of ±180°, so a stretch of it stays off the world and isn't drawn (before #2355 the same ring drew a line across the map). Expected: the ring split at ±180° in the flat branch, each piece drawn where it lies, with a test of a pole-containing globe frame on a flat locator.
Activity
jgregoriorincon commentedon Nov 17, 2026
I'm taking this one; it follows #2355.
jgregoriorincon commentedon Nov 18, 2026
A third case for this issue, from the review of #2355: a frame on the globe around a pole, outlined on a flat frame. Its ring spans a whole turn of longitude, and
outline_lonlatmoves a globe frame's ring as a whole to the flat frame's side of ±180°, so a stretch of it stays off the world and isn't drawn (before #2355 the same ring drew a line across the map). Expected: the ring split at ±180° in the flat branch, each piece drawn where it lies, with a test of a pole-containing globe frame on a flat locator.