Skip to content

iOS: add flyToCamera edgePadding+peakAltitude overload#4244

Open
nagisa77 wants to merge 2 commits into
maplibre:mainfrom
nagisa77:codex/issue-791-fly-edgepadding-peak-altitude
Open

iOS: add flyToCamera edgePadding+peakAltitude overload#4244
nagisa77 wants to merge 2 commits into
maplibre:mainfrom
nagisa77:codex/issue-791-fly-edgepadding-peak-altitude

Conversation

@nagisa77

@nagisa77 nagisa77 commented Apr 21, 2026

Copy link
Copy Markdown

Summary

  • add a new iOS API overload: flyToCamera:edgePadding:withDuration:peakAltitude:completionHandler:
  • route existing flyToCamera:withDuration:peakAltitude:completionHandler: and flyToCamera:edgePadding:withDuration:completionHandler: through the new overload to keep behavior consistent
  • use shared inset combination logic (MLNEdgeInsetsInsetEdgeInset) for contentInset + edgePadding
  • add tests covering the new API for completion callback and effective camera padding behavior

Why

Issue #791 requests parity with setCamera(... edgePadding ...) so fly transitions can also accept camera edge padding. While an edgePadding-only fly API exists, there was no public overload that combines edgePadding and peakAltitude.

User/Developer Impact

  • iOS developers can now fly to a camera while specifying both transient edge padding and a peak altitude in one call.
  • existing fly APIs remain unchanged and now share one internal path.

Root Cause

The fly API surface exposed peakAltitude and edgePadding separately, but not together, even though the internal implementation (_flyToCamera) already supports both.

Validation

  • Added MLNMapViewGestureRecognizerTests::testFlyToCameraWithEdgePaddingAndPeakAltitude
  • Added MLNCameraTransitionFinishTests::testFlyToCompletionHandlerWithEdgePaddingAndPeakAltitude

@github-actions github-actions Bot added the iOS label Apr 21, 2026
@nagisa77 nagisa77 changed the title [codex] iOS: add flyToCamera edgePadding+peakAltitude overload iOS: add flyToCamera edgePadding+peakAltitude overload Apr 21, 2026
@nagisa77
nagisa77 marked this pull request as ready for review April 21, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants