Skip to content

Android: map padding prop change not move camera like on IOS #92

@adammatis

Description

@adammatis

Before submitting a new issue

  • I tested using the latest version of the library (the bug might already be fixed).
  • I tested using a supported version of React Native.
  • I checked for possible duplicate issues, with possible answers.
  • I am willing to help with debugging or contribute a fix (otherwise my issue might be closed).

Bug summary

I noticed if I change map padding property it doesn't change the camera position on Androiod.
It works well on IOS.

I tried to set camera to current postion with mapRef.setCamera, but it makes an infinite loop firing onCameraChangeComplete.

Library version

1.10.2

Environment info

npmPackages:
  "@react-native-community/cli":
    installed: 20.0.2
    wanted: 20.0.2
  react:
    installed: 19.1.0
    wanted: 19.1.0
  react-native:
    installed: 0.81.5
    wanted: 0.81.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Steps to reproduce

  1. Implement a GoogleMapsView with mapPadding prop
  2. Change mapPadding
  3. On IOS map padding and camera have changed, but on Android only map padding has changed and camera position is the same

Reproducible example repository

https://github.com/adammatis/react-native-google-maps-plus-test.git

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstale

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions