[Feature request] Missing MapView camera change event listeners in the Navigation SDK for React Native

Offen
#449 2 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 5 Tagen

@illuminati1911 arbeitet bereits daran.

Seit 16.7.2025.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

priority: p3 type: feature request
Is there an existing issue for this?
  • I have searched the existing issues
Description of the bug

I'm trying to detect camera movement events (e.g. onCameraIdle, onCameraMove) using the Navigation SDK for React Native, but these listeners don't appear to be exposed in the current version. I’ve checked the documentation and tried using mapViewCallbacks, but no camera-related events are triggered.

Would it be possible to expose these listeners or provide an alternative way to track camera changes?

React Native version

0.73.6

React version

18.2.0

Package version

0.9.3

Native SDK versions
  • I haven't changed the version of the native SDKs
React Native Doctor Output

$ npx react-native doctor
⠴ Running diagnostics...'"adb"' is not recognized as an internal or external command,
operable program or batch file.
Common
✓ Node.js - Required to execute JavaScript code
✓ npm - Required to install NPM dependencies
● Metro - Metro Bundler is not running

Android
✖ Adb - No devices and/or emulators connected. Please create emulator with Android Studio or connect Android device.
✖ JDK - Required to compile Java code

  • Version found: 11.0.16.1
  • Version supported: >= 17 <= 20
    ✖ Android Studio - Required for building and installing your app on Android
    ✖ ANDROID_HOME - Environment variable that points to your Android SDK installation
    ✓ Gradlew - Build tool required for Android builds
    ✖ Android SDK - Required for building and installing your app on Android
  • Versions found: N/A
  • Version supported: .b34.0.0

Errors: 5
Warnings: 1

Steps to reproduce

Add a component to your screen.

  1. Pass the following mapViewCallbacks:
<MapView
  mapViewCallbacks={{
    onCameraMoveStarted: (reason) => {
      console.log('Camera move started:', reason);
    },
    onCameraMove: () => {
      console.log('Camera is moving');
    },
    onCameraIdle: () => {
      console.log('Camera is idle');
    },
  }}
  onMapViewControllerCreated={setMapViewController}
/>
  1. Interact with the map by dragging or zooming.

  2. Observe the console

Expected vs Actual Behavior
<MapView
  mapViewCallbacks={{
    onCameraMoveStarted: (reason) => {
      console.log('Camera move started:', reason);
    },
    onCameraMove: () => {
      console.log('Camera is moving');
    },
    onCameraIdle: () => {
      console.log('Camera is idle');
    },
  }}
  onMapViewControllerCreated={setMapViewController}
/>

The following logs should be printed during user interaction:

  • Camera move started: [reason]
  • Camera is moving
  • Camera is idle
Code Sample
<MapView
  mapViewCallbacks={{
    onCameraMoveStarted: (reason) => {
      console.log('Camera move started:', reason);
    },
    onCameraMove: () => {
      console.log('Camera is moving');
    },
    onCameraIdle: () => {
      console.log('Camera is idle');
    },
  }}
  onMapViewControllerCreated={setMapViewController}
/>

Additional Context

No response

Vorherrschende Sprache
TypeScript
Sterne
226
Forks
39
Ø Merge
1 T. 20 Std.
Gemergte PRs (30 T.)
7

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus googlemaps/react-native-navigation-sdk

Alle Issues in googlemaps/react-native-navigation-sdk

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.