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

Add MGLCompassButton and MGLOrnamentVisibility #15055

Merged
merged 5 commits into from
Jul 11, 2019

Conversation

friedbunny
Copy link
Contributor

@friedbunny friedbunny commented Jul 4, 2019

Fixes #9562 by adding MGLCompassButton.visibility (and, well, MGLCompassButton).

Changes

  • MGLMapView.compassView is now an MGLCompassButton, a subclass of UIImageView (its former type).
  • Refactored most of the compass logic out if MGLMapView and into MGLCompassButton.
  • Added MGLOrnamentVisibility constants, with options for adaptive, visible, and hidden. These can later be adopted by other ornaments, should we so choose.

To-do

  • Finish writing documentation.
  • Write new tests, adapt old ones.
  • Rename MGLCompassButton to MGLCompassView?
  • Consider whether or not to allow arbitrary compasses that aren’t necessarily map subviews.
    • Pushing this to potential tailwork.
  • Changelog.

@friedbunny friedbunny added feature iOS Mapbox Maps SDK for iOS UX labels Jul 4, 2019
@friedbunny friedbunny added this to the release-picklejuice milestone Jul 4, 2019
@friedbunny friedbunny self-assigned this Jul 4, 2019
@friedbunny friedbunny force-pushed the friedbunny-customizes-compass-visibility branch from bb128b5 to 0f241f1 Compare July 10, 2019 01:01
@friedbunny friedbunny marked this pull request as ready for review July 10, 2019 01:26
@friedbunny friedbunny requested a review from 1ec5 as a code owner July 10, 2019 01:26
@friedbunny friedbunny requested review from a team and captainbarbosa July 10, 2019 01:26
Copy link
Contributor

@captainbarbosa captainbarbosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice cleanup!

@friedbunny friedbunny added the MapKit parity For feature parity with MapKit on iOS or macOS label Jul 11, 2019
@friedbunny friedbunny merged commit 5b48822 into master Jul 11, 2019
@friedbunny friedbunny deleted the friedbunny-customizes-compass-visibility branch July 11, 2019 23:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature iOS Mapbox Maps SDK for iOS MapKit parity For feature parity with MapKit on iOS or macOS UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow compass visibility customization
2 participants