You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: (Android only) onMapIdle (etc) does not trigger with a native UserLocation #2902
AndroidAndroid related ticketstodoValid bug, but we don't have time to look intoupstreamthe bug source is a bug in native mapbox glwaitingNon planned issues
Effectively, we wanted to use it as a replacement for onRegionDidChange. One use case is to capture and store the latest viewport that the user panned to.
It looks like onMapIdle has a more render-focused meaning. However, I'm not sure how to achieve this right now with v10. Maybe the wrapper needs some camera lifecycle callbacks?
@savv thanks much, they suggest adding camera animation observers for that purpose. I'll try to implement that and we'll see if that meets your use case.
You're right that onMapIdle is not a replacement for onRegionDidChange
You're right that onMapIdle is not a replacement for onRegionDidChange
Do you think we should change the function jsdoc in the MapView.tsx file related to onMapIdle as it currently says it IS a replacement and is probably leading to a bit of confusion.
'onRegionDidChange is deprecated and will be removed in next release - please use onMapIdle. https://github.com/rnmapbox/maps/wiki/Deprecated-RegionIsDidChange',
);
If you think its a good idea I can pop in a PR for it.
Given that this is a bug and not a feature request, it would make sense to me to keep it open. That way, people facing the same issue can find it more easily; and maybe even fix it (or at least update the docs, as somebody already suggested).
Reacted by Guillaume HITIER, Jean-Baptiste Crestot and Miguel Jara
AndroidAndroid related ticketstodoValid bug, but we don't have time to look intoupstreamthe bug source is a bug in native mapbox glwaitingNon planned issues
Activity
trungledangAxonActive commentedon Jun 26, 2023
I also got this issue
mfazekas commentedon Jun 29, 2023
What is the use case for onMapIdle?
It seems that the pulsing is useLocation prevents the map renderer from going to idle, so onMapIdle will not be called.
mapbox/mapbox-maps-android#2116
savv commentedon Jun 30, 2023
Effectively, we wanted to use it as a replacement for onRegionDidChange. One use case is to capture and store the latest viewport that the user panned to.
It looks like onMapIdle has a more render-focused meaning. However, I'm not sure how to achieve this right now with v10. Maybe the wrapper needs some camera lifecycle callbacks?
mfazekas commentedon Jun 30, 2023
@savv thanks much, they suggest adding camera animation observers for that purpose. I'll try to implement that and we'll see if that meets your use case.
You're right that onMapIdle is not a replacement for onRegionDidChange
kassemitani commentedon Jul 12, 2023
We have the same issue,
onMapIdleis not being triggered on Android. WhileonCameraChangedis being triggered both iOS & Android.mfazekas commentedon Jul 12, 2023
For now the workaround is to use debounce onCameraChanged. That should be called when map stopped changing for a while
kesteer commentedon Jul 19, 2023
@mfazekas
Do you think we should change the function jsdoc in the MapView.tsx file related to
onMapIdleas it currently says it IS a replacement and is probably leading to a bit of confusion.And also in the console warning.
maps/src/components/MapView.tsx
Lines 540 to 542 in 27ab126
If you think its a good idea I can pop in a PR for it.
mfazekas commentedon Dec 9, 2023
Valid bug, but not planned do to lack of resources. Closing as not planned.
I don't think this is to be fixed, but would be nice to provide some solution for the use case.
savv commentedon Dec 11, 2023
Given that this is a bug and not a feature request, it would make sense to me to keep it open. That way, people facing the same issue can find it more easily; and maybe even fix it (or at least update the docs, as somebody already suggested).
davor-bauk-sh commentedon May 6, 2024
I'm also experiencing this on iOS. Neither
onMapIdlenoronRegionDidChangeget called whenLocationPuck'spulsing.isEnabledproperty istrue.csimpi commentedon Feb 9, 2025
@mfazekas update on this? This means whole huge features are totally bugged and unusable.