Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Populate Node Position Label as appropriate #245

Merged
merged 2 commits into from
Nov 23, 2019

Conversation

Pilot-Marc
Copy link
Collaborator

@Pilot-Marc Pilot-Marc commented Nov 22, 2019

Background

Populate the "Tap a node to see location" label

Breaking Changes

Added the .short property extension to Double, I suppose this could conflict with a pre-existing extension of the same name.

Details:

  • The label is now populated as a result of a hit test match, with coords, elevation, and tag
  • Changed hitTest to hitTests, because its an array
  • Added left padding to the label to visually match the label below it (and because it's the right thing to do)
  • Added The Alamo to the poi list, mostly because my office faces South and I was getting tired of continuously turning around to test the app

Meta

  • Tied to Version Release(s):

PR Checklist

  • CI runs clean?
  • Appropriate label has been added to this PR (i.e., Bug, Enhancement, etc.).
  • Documentation has been added to all open, and public scoped methods and properties.
  • Changelog has been updated
  • Tests have have been added to all new features. (not a requirement, but helpful)
  • [x ] Image/GIFs have been added for all UI related changed.

Screenshots

image

@@ -362,11 +365,20 @@ extension POIViewController {
extension POIViewController: LNTouchDelegate {

func annotationNodeTouched(node: AnnotationNode) {
print("AnnotationNode touched \(node)")
if let node = node.parent as? LocationNode {
let coords = "\(node.location.coordinate.latitude.short) \(node.location.coordinate.longitude.short)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we have degree symbols, and "m" for the altitude? I didn't understand what I was seeing at first, thought they might have been x/y/z world coordinates.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. I thought about adding additional text such as full word "meters", or "N,E,S,W" for the coords, but skipped that to be respectful for narrow devices.

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

There's lots of good stuff at https://github.com/FormatterKit/FormatterKit for angles. Not an appropriate dependency for a library demo, but I use several of those formatters for production.

@halmueller halmueller merged commit f1bb310 into AndrewHartAR:develop Nov 23, 2019
@Pilot-Marc Pilot-Marc deleted the node-position-label branch November 23, 2019 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants