feat(firms): a marker stand-in can set how far the camera stands from a fire it draws (#1832)

setMarkerStandIn takes an optional focusRangeM(record): when a click on a fire the stand-in draws moves the camera there, it stands off that many metres instead of the usual fire framing. A world focus request may carry its own rangeM; past the framed radius it replaces the kind's range.
This commit is contained in:
Sameh Khamis authored and GitHub committed 2026-11-18 17:46:31 -08:00
1 parent 0a9235cc69
commit cd144ecad5
6 files changed
+63 -3

No files matched your search

+6 -2
View File
@@ -85,7 +85,8 @@ export function routeWorldFocusRequest(event, runExplicitFocus, fly) {
* `keepView` (a click on it) keeps the camera's distance and angle: the eye
* moves, on a straight path, to where it sees the target in the centre with
* the view it has now (`keptViewFrom`). Any other is framed by its kind
* (`WORLD_FOCUS_FRAMING`).
* (`WORLD_FOCUS_FRAMING`); a target's own `rangeM`, past the framed radius,
* stands the camera off that far instead (a target larger than its kind).
*/
export function flyToWorldTarget(viewer, target = {}) {
const camera = findCamera(viewer);
@@ -118,7 +119,10 @@ export function flyToWorldTarget(viewer, target = {}) {
offset: {
heading,
pitch: toRadians(framing.pitchDeg),
range: framing.rangeM,
range:
Number.isFinite(target.rangeM) && target.rangeM > framing.radiusM
? target.rangeM
: framing.rangeM,
},
durationS: duration,
easing: 'cubicInOut',