Skip to content

Add MapCameraPosition.fov and padding emulation - #39

Merged
wf9a5m75 merged 5 commits into
developfrom
feat/camera-paddings
Nov 12, 2026
Merged

wf9a5m75 merged 5 commits into
developfrom
feat/camera-paddings

Conversation

@wf9a5m75

Copy link
Copy Markdown
Contributor

Summary

  • New read-only MapCameraPosition.fov: the vertical field of view of the camera as currently rendered (0 = tilt drawn without perspective, null = unknown / the map cannot tilt). Each provider reports its own engine's value; core holds no default.
  • New internal helper that emulates paddings for engines without a native padding API: it moves the camera centre so the target sits at the centre of the padded area, using the provider's fov (pinhole camera for fov > 0, squashed plane for fov 0, plain pixel shift when unknown), plus the inverse for read-back.

Provider PRs on feat/camera-paddings depend on this one.

Commits

  • Add MapCameraPosition.fov and a padding emulation helper
  • Add applied/restored helpers for padding emulation
  • Let padding emulation measure with the map's projection
  • Merge remote-tracking branch 'origin/develop' into feat/camera-paddings
  • Update API baseline for MapCameraPosition.fov

fov is the vertical field of view of the rendered camera, filled by each
provider when it reads the camera back (0 = tilt drawn without
perspective, nil = unknown). Core holds no default value.

CameraPaddingEmulation (driver SPI) places the target at the center of
the area left after the paddings for engines without native padding: it
shifts the camera center by the ground distance of (dx, dy), using the
provider's fov for tilted perspective views, and maps it back on read.
Providers without native padding convert the camera once at the move
entry point and convert the read-back camera back, so animation frames
interpolate in the camera-center space.
restored() can take the map's unproject to read the target straight from
the padded center, and correctedCenter() nudges the camera until the
target lands there. Engines whose scale or pitch limits differ from the
model (MapKit, TomTom) stay exact.
@wf9a5m75
wf9a5m75 merged commit 21ebc74 into develop Nov 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant