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

Turn the compass into a button - #1830

Closed
1ec5 wants to merge 1 commit into
masterfrom
1ec5-compass-button
Closed

1ec5 wants to merge 1 commit into
masterfrom
1ec5-compass-button

Conversation

@1ec5

@1ec5 1ec5 commented Jul 2, 2015

Copy link
Copy Markdown
Contributor

Touching down on the compass but dragging outside it should cause the map to pan, not reset to north. (This is how Maps behaves, though I’m open to changing the event back to UIControlEventTouchDown.) This PR also renames the property to reflect its new type.

This change obsoletes part of 90af18e for #1496 but omits the accessibility-related changes contained therein.

/cc @incanus @friedbunny

Touching down on the compass but dragging outside it should cause the map to pan, not reset to north. Also renamed the property to reflect its new type.

This change obsoletes part of 90af18e but leaves out the accessibility-related changes there.
@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS refactor labels Jul 2, 2015
@1ec5 1ec5 self-assigned this Jul 2, 2015
@1ec5 1ec5 changed the title Turned the compass into a button Turn the compass into a button Jul 2, 2015
@friedbunny

Copy link
Copy Markdown
Contributor

This change introduces a delay between tapping the compass and return-to-north activation. Tapping highlights the compass button (i.e., adds a dark overlay) for ~0.5s before activating.

@1ec5

1ec5 commented Jul 2, 2015

Copy link
Copy Markdown
Contributor Author

Yes, that’s the price to pay for accepting pans from the top-right corner of the screen. MapKit does the same thing, though it doesn’t highlight the button. I can easily nix the highlight by setting the same compass image for the highlighted state if that makes the compass feel more natural.

@1ec5

1ec5 commented Jul 2, 2015

Copy link
Copy Markdown
Contributor Author

Switching to UIControlEventTouchDown would eliminate the delay but also eliminate the ability to detect pans from the corner.

@1ec5

1ec5 commented Jul 2, 2015

Copy link
Copy Markdown
Contributor Author

Ah, I’m mistaken: we already do support panning from the corner because the compass and pan gestures aren’t allowed to run simultaneously. The MapKit compass also recognizes taps immediately without delay. Serves me right for testing only in the Simulator.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

iOS Mapbox Maps SDK for iOS refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants