Repository navigation
Add MapCameraPosition.fov and padding emulation - #39
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.paddingsfor 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-paddingsdepend on this one.Commits