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
moveend event handler is invoked after result is triggered #131
changed the title [-]`moveend` handler is invoked after `result` is triggered[/-][+]`moveend` event handler is invoked after `result` is triggered[/+]on Oct 30, 2017
@Erutan409 I suspect this is because of #99, which causes the result event to be fired twice. As part of that the map tries to animate to the location twice (the first one being interrupted by the second).
Interrupting a camera animation with another camera animation in GL JS causes the moveend event to fire, hence you're getting the issue you describe.
Unfortunately #99 is not easy to fix for both modern browsers and IE11, so it remains a bug.
If you don't need to support IE11 then you can try #99 (comment) and see if that resolves the issue?
Activity
[-]`moveend` handler is invoked after `result` is triggered[/-][+]`moveend` event handler is invoked after `result` is triggered[/+]andrewharvey commentedon Dec 15, 2017
@Erutan409 I suspect this is because of #99, which causes the result event to be fired twice. As part of that the map tries to animate to the location twice (the first one being interrupted by the second).
Interrupting a camera animation with another camera animation in GL JS causes the moveend event to fire, hence you're getting the issue you describe.
Unfortunately #99 is not easy to fix for both modern browsers and IE11, so it remains a bug.
If you don't need to support IE11 then you can try #99 (comment) and see if that resolves the issue?
Erutan409 commentedon Dec 17, 2017
I'll check my code Monday, but I think I solved it with a closure and a brief timeout. It was weird, but necessary.
fixes double moveend event #131
scottsfarley93 commentedon Mar 21, 2019
This was addressed in #229 and will be fixed when version 4 is released.
Merge branch 'version4' into version4-design-updates
Merge branch 'version4' into feedback