Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Fixed incorrect notification #2373

Closed
wants to merge 3 commits into from
Closed

Fixed incorrect notification #2373

wants to merge 3 commits into from

Conversation

maciekish
Copy link
Contributor

This is incorrect, no?

UIGestureRecognizerStateChanged should yield MapChangeRegionIsChanging and not until UIGestureRecognizerStateEnded should you get MapChangeRegionDidChangeAnimated.

@friedbunny friedbunny added bug iOS Mapbox Maps SDK for iOS labels Sep 21, 2015
@1ec5
Copy link
Contributor

1ec5 commented Sep 22, 2015

Thanks @maciekish! MGLMapView has a few more gesture recognizers (-handleQuickZoomGesture:, -handleRotateGesture:, -handleTwoFingerDragGesture:) that would benefit from the same notification flow.

@maciekish
Copy link
Contributor Author

@1ec5 I added it to the quick zoom, but should rotate and pitch really send this notification? From what i understand they don't really change the actual region? I held off with this until further notice because handleTwoFingerDragGesture state == UIGestureRecognizerStateEnded has a commented out //[self notifyMapChange:(mbgl::MapChangeRegionDidChange)]; which leads me to believe that someone thought the same..

@friedbunny
Copy link
Contributor

I held off with this until further notice because handleTwoFingerDragGesture state == UIGestureRecognizerStateEnded has a commented out //[self notifyMapChange:(mbgl::MapChangeRegionDidChange)]; which leads me to believe that someone thought the same..

That would be me. 😏

Changing the pitch of the map does change the visible region and it should give a change notification, but I never got around to testing the practical effects of actually sending this notification.

@maciekish
Copy link
Contributor Author

It changes the visible region - but does it change mapView.visibleCoordinateBounds?

If i recall correctly it does not, and i would only want notifications when the visibleCoordinateBounds change. Otherwise it's not of much use because it will say "hey, something changed" but not what the new values are.

@t-yoshii
Copy link

I have a same problem. Will this be merged shortly?

@1ec5
Copy link
Contributor

1ec5 commented Oct 19, 2015

I added it to the quick zoom, but should rotate and pitch really send this notification? From what i understand they don't really change the actual region?

Rotating by 45° does expand the visible coordinate bounds a bit. Tilting the map should alter the visible coordinate bounds but currently does not, due to #2259.

@1ec5
Copy link
Contributor

1ec5 commented Oct 21, 2015

Thanks for the PR and your patience – tracking as #2700 now.

@1ec5 1ec5 closed this Oct 21, 2015
@maciekish maciekish deleted the fixed-notification branch October 27, 2015 15:11
@incanus incanus added the P2 label Nov 4, 2015
@maciekish maciekish restored the fixed-notification branch September 14, 2016 08:53
@maciekish maciekish deleted the fixed-notification branch September 14, 2016 08:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants