onMapIdle and onCameraChanged not called on Android
See original GitHub issueDescribe the bug
the callback supplied to onMapIdle
and onCameraChanged
is not being called on my Android device, but is on iOS. This is the mirror opposite of this earlier bug I filed https://github.com/rnmapbox/maps/issues/1887
To Reproduce
Steps to reproduce the behavior.
BTW this repro bug templatejs is not public anymore: our BugReportTemplate screens
import React from 'react';
import {
MapView,
ShapeSource,
LineLayer,
Camera,
} from '@rnmapbox/maps';
const aLine = {
type: 'LineString',
coordinates: [
[-74.00597, 40.71427],
[-74.00697, 40.71527],
],
};
class BugReportExample extends React.Component {
render() {
return (
<MapboxGL.MapView
onMapIdle={()=> console.log("not working on android")}
>
<MapboxGL.UserLocation
onUpdate={this.onUserLocationUpdated}
/>
<MapboxGL.Camera
zoomLevel={12}
animationMode={"flyTo"}
centerCoordinate={[0,0]}
/>
</MapboxGL.MapView>
);
}
}
Expected behavior
callback to be called
Actual behavior
callback not calling for Android
Versions (please complete the following information):
- Platform: Android
- Platform OS: API 30
- Device: pixel 5
- Emulator/ Simulator: yes
- Dev OS: osx 12.2.1
- @rnmapbox/maps Version 10.0.0-beta.1
- Mapbox GL version unknown
- React Native Version 0.67.2
additinoal info my setup is with mapbox
Issue Analytics
- State:
- Created a year ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Android onCameraChange in Fragment is never called
The method onCameraChange, implemented by the Fragment that host the SupportMapFragment, is never called also if I set up all right.
Read more >[android] Problem with CameraIdleListener · Issue #12260
When I try to pinch to zoom (in/out) OnCameraIdleListener is called multiple times. We tried couple of work arounds such as using 200ms...
Read more >GoogleMap.OnCameraIdleListener | Google Play services
Called when camera movement has ended, there are no pending animations and the user has stopped interacting with the map. This is called...
Read more >Fix an installed Android app that isn't working - Google Support
Try the following steps if an app installed on your phone has any of these problems: Crashing. Won't open. Won't respond. Isn't working...
Read more >Behavior changes: apps targeting API 29+ - Android Developers
If you will not be targeting Android 10 (API level 29), some of these changes ... This change increases security and robustness when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Totally fair, I was just prioritizing differently. No need to do a breaking change for these functions
@1mike12 To be fair, none of the map callbacks had been implemented on iOS for v10 yet - so this wasn’t a breaking change so much as implementing a new feature differently from the documentation. Still - point taken! 😃