rnmapbox / maps

A Mapbox react native module for creating custom maps
MIT License
2.27k stars 849 forks source link

[Bug]: Camera.zoomTo not working #3389

Closed g4rb4g3 closed 8 months ago

g4rb4g3 commented 8 months ago

Mapbox Implementation

Mapbox

Mapbox Version

11.1.0

React Native Version

0.72.6

Platform

iOS

@rnmapbox/maps version

10.1.13

Standalone component to reproduce

MapboxGL.Camera.zoomTo seems to be broken, it tries to call setCamera without centerCoordinate and without bounds which are required in RNMBXCamera.swift

https://github.com/rnmapbox/maps/blob/main/ios/RNMBX/RNMBXCamera.swift#L402 https://github.com/rnmapbox/maps/blob/main/ios/RNMBX/RNMBXCamera.swift#L425

With both props missing the camera check will make it return without zooming. https://github.com/rnmapbox/maps/blob/main/ios/RNMBX/RNMBXCamera.swift#L464

Observed behavior and steps to reproduce

Nothing is happening when calling zoomTo

Expected behavior

zooming should work

Notes / preliminary analysis

No response

Additional links and references

No response

github-actions[bot] commented 8 months ago

No code example found in issue body - More info

g4rb4g3 commented 8 months ago

@mfazekas Sorry for not providing an example but from the information I provided it should be pretty easy to understand what is not working. Could you still check it please? Thanks!

anis-18 commented 8 months ago

Also not working for me

anis-18 commented 8 months ago

Any fix for this issue ???

cyrilmarceau commented 8 months ago

Same problem on iOS with version 11.0.0

anis-18 commented 7 months ago

any updates for this issue guys ?

illlama commented 7 months ago

I'm getting same issue too.

efstathiosntonas commented 5 months ago

Any updates on this one? It's still an issue on 10.1.24