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 }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
The map should starts to fly to your location. The tap on screen stops the map and the user location is not visible (as it is far from the bounding box)
Actual behavior
The map starts to fly to the user location. The tap on screen stops the map but the user location is shown on the middle of the map where it should not be. It stays there as long a new location is received.
The bug comes from the user location considered as centered from the start of the action but it is not yet centered before the end of animation.
One way would to allow tap recognizer to handle the tap if the tracking mode is not none and state is began. This way, the map knows the user stopped the map from scrolling then fall back to tracking state none.
I can try this solution.
I fall in a problem: a touch is detected, the map engine stop the movement and the fly camera completion is called before the tap gesture recognizer is fired. So the fly camera completion does not inform us if the animation completed or has been interrupted by user tap...
the completion handler of the MGLMapView.mm method _flyToCamera:::: should have a boolean parameter indicating if the animation fully finish or has been interrupted by the _mbglMap->cancelTransitions() call (from touchBegan:).
I tried to use only tap recognizer from ObjC level but it seems that the only clean solution is to go deeper into the c++ engine.
Activity
RomainQuidet commentedon Jan 31, 2017
One way would to allow tap recognizer to handle the tap if the tracking mode is not none and state is began. This way, the map knows the user stopped the map from scrolling then fall back to tracking state none.
I can try this solution.
RomainQuidet commentedon Jan 31, 2017
I fall in a problem: a touch is detected, the map engine stop the movement and the fly camera completion is called before the tap gesture recognizer is fired. So the fly camera completion does not inform us if the animation completed or has been interrupted by user tap...
RomainQuidet commentedon Jan 31, 2017
the completion handler of the MGLMapView.mm method _flyToCamera:::: should have a boolean parameter indicating if the animation fully finish or has been interrupted by the _mbglMap->cancelTransitions() call (from touchBegan:).
I tried to use only tap recognizer from ObjC level but it seems that the only clean solution is to go deeper into the c++ engine.
RomainQuidet commentedon Jan 31, 2017
I succeeded into getting a correct behavior here by adding simples lines before
_mbglMap->cancelTransitions();`- (void)touchesBegan:(__unused NS_SET_OF(UITouch *) *)touches withEvent:(__unused UIEvent *)event
{
_changeDelimiterSuppressionDepth = 0;
_mbglMap->setGestureInProgress(false);
if (self.userTrackingState == MGLUserTrackingStateBegan)
{
[self setUserTrackingMode:MGLUserTrackingModeNone];
}
_mbglMap->cancelTransitions();
}`
I'm not sure if you like it.
1ec5 commentedon Feb 1, 2017
Related to #4781.
eimantas commentedon Feb 7, 2017
Another one may be to ignore user interaction until animation is complete.
RomainQuidet commentedon Feb 7, 2017
fabian-guerra commentedon Jun 22, 2017
Fixed in #7916