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

Allow compass visibility customization #9562

Closed
halset opened this issue Jul 20, 2017 · 7 comments · Fixed by #15055
Closed

Allow compass visibility customization #9562

halset opened this issue Jul 20, 2017 · 7 comments · Fixed by #15055
Assignees
Labels
feature iOS Mapbox Maps SDK for iOS MapKit parity For feature parity with MapKit on iOS or macOS

Comments

@halset
Copy link
Contributor

halset commented Jul 20, 2017

Our users love the compass and want to have it visible all the time. I have added an parameter, compassAlwaysVisible to MGLMapView in our branch that fixes this.

mapView.compassAlwaysVisible = YES;

Would it make sense to have this as an standard option i Mapbox GL Native? Do you want this minor thing as a pull-request?

@kkaefer kkaefer added the iOS Mapbox Maps SDK for iOS label Jul 20, 2017
@fabian-guerra
Copy link
Contributor

Hi @halset. Thank you for asking. Even if this is a small change most of our users don't expect the compass to be displayed unless required. If we make this change it will require them to adjust their code.

@halset
Copy link
Contributor Author

halset commented Jul 20, 2017

I have compassAlwaysVisible set to NO by default, so users would not need to change anything.

@friedbunny
Copy link
Contributor

MapKit is adding this feature in iOS 11 via a separate MKCompassButton, which includes a compassVisibility enum with adaptive, hidden, and visible options. That’s a nice approach.

In terms of our existing compass setup, I think it’d be better to add a visibility property on -[MGLMapView.compassView] with similar options.

@friedbunny friedbunny added the MapKit parity For feature parity with MapKit on iOS or macOS label Jul 20, 2017
halset added a commit to halset/mapbox-gl-native that referenced this issue Jun 25, 2018
@stale stale bot added the archived Archived because of inactivity label Nov 5, 2018
@stale
Copy link

stale bot commented Dec 1, 2018

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Dec 1, 2018
@friedbunny friedbunny reopened this Dec 2, 2018
@stale stale bot removed the archived Archived because of inactivity label Dec 2, 2018
@halset
Copy link
Contributor Author

halset commented Feb 18, 2019

@friedbunny

  • Should there be a new MGLCompassView class instead of the existing UIImageView for MGLMapView.compassView? Or should we just add a MGLMapView.compassVisibility
  • What is a good name for the visibility enum? VisibilityType is already present, but should probably not be expanded with an adaptive-variant. Translating MKFeatureVisibility to MGLFeatureVisibility is probably not the best as feature is something else? Perhaps MGLVisibility or would that be mixed up with VisibilityType?

halset added a commit to halset/mapbox-gl-native that referenced this issue Jun 11, 2019
@friedbunny friedbunny changed the title Optionally always visible compass Allow compass visibility customization Jul 1, 2019
@friedbunny friedbunny self-assigned this Jul 1, 2019
@friedbunny friedbunny added this to the release-p milestone Jul 1, 2019
@chloekraw chloekraw changed the title Allow compass visibility customization Option to show compass even if it is facing north Jul 2, 2019
@friedbunny friedbunny changed the title Option to show compass even if it is facing north Allow compass visibility customization Jul 2, 2019
@friedbunny
Copy link
Contributor

friedbunny commented Jul 2, 2019

@chloekraw I changed the title again, as my current intention is to implement adaptive, hidden, and visible options, which is more flexible than a single option to show-the-compass-even-when-it’s-facing-north.

@chloekraw
Copy link
Contributor

Oh, @friedbunny, I think I had the tab open and changed the title without refreshing the page, so I didn't know that you had already changed it. I meant to override the original title, not yours!

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants