Skip to content

fitCoordinates(...) resets heading/bearing to 0; moveCamera(...) also does not preserve heading/bearing #75

@KirillKaverin

Description

@KirillKaverin

Before submitting a new issue

  • I tested using the latest version of the library, as the bug might be already fixed.
  • I tested using a supported version of react native.
  • I checked for possible duplicate issues, with possible answers.

Bug summary

  • Android (Google Maps): fitCoordinates(...) sets bearing to ; moveCamera(...) also does not preserve/restore non-zero bearing.
  • iOS (Apple Maps): fitCoordinates(...) sets heading to ; moveCamera(...) also does not preserve/restore non-zero heading.
  • iOS (Google Maps): fitCoordinates(...) sets bearing to ; moveCamera(...) also results in bearing .

Library version

1.0.0-beta.13

Environment info

System:
  OS: macOS 26.3.1
  CPU: (10) arm64 Apple M1 Max
  Memory: 93.89 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 24.15.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 4.11.0
    path: /opt/homebrew/bin/yarn
  npm:
    version: 11.12.1
    path: /opt/homebrew/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/lib/ruby/gems/4.0.0/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.2
      - iOS 26.2
      - macOS 26.2
      - tvOS 26.2
      - visionOS 26.2
      - watchOS 26.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.3 AI-253.32098.37.2534.15336583
  Xcode:
    version: 26.3/17C529
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.19
    path: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 4.0.3
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: 20.0.0
  react:
    installed: 19.2.0
    wanted: 19.2.0
  react-native:
    installed: 0.83.0
    wanted: 0.83.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Steps to reproduce

  1. Open the example app Home screen.
  2. Ensure there are several markers (tap Add marker a few times in ControlSheet).
  3. Rotate the map with a two-finger gesture to a visible non-zero heading/bearing.
  4. Tap Fit markers (onFitMarkersfitCoordinates(...)).
  5. Observe heading/bearing resets to .
  6. Rotate again to non-zero heading/bearing.
  7. Tap Move camera (onMoveCameramoveCamera(...)).
  8. Observe heading/bearing is not preserved (returns to ).

Reproducible example repository

https://github.com/lugg/maps

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions