Skip to content

[Update] Show line of sight analysis in map to use callout#773

Open
CalebRas wants to merge 3 commits intov.nextfrom
Caleb/Update-ShowLineOfSightAnalysisInMap
Open

[Update] Show line of sight analysis in map to use callout#773
CalebRas wants to merge 3 commits intov.nextfrom
Caleb/Update-ShowLineOfSightAnalysisInMap

Conversation

@CalebRas
Copy link
Copy Markdown
Collaborator

Description

This PR updates Show line of sight analysis in map to use a callout to show line of sight visibility info instead of a popover, matching updates made to the design.
URL to README: Show line of sight analysis in map

Linked Issue(s)

  • swift/issues/8058
  • common-samples/pull/4052

How To Test

  • Tap on an observer to see it's line of sight visibility info.

Screenshots

Before After
Simulator Screenshot - iPhone 17 Pro - 2026-04-15 at 10 35 45-2 Simulator Screenshot - iPhone 17 Pro - 2026-04-15 at 12 46 20-2
Simulator Screenshot - iPhone 17 Pro - 2026-04-15 at 10 35 53-2 show-line-of-sight-analysis-in-map

@CalebRas CalebRas self-assigned this Apr 15, 2026
@CalebRas CalebRas requested review from a team, chriswebb09, mhdostal, philium and zkline101 and removed request for a team, chriswebb09 and zkline101 April 15, 2026 20:02
@CalebRas
Copy link
Copy Markdown
Collaborator Author

Removed Chris and Zach since they are both out.

Comment thread Shared/Samples/Show line of sight analysis in map/README.md Outdated
} else {
0.0
}
let formattedVisibleLength = visibleLength.formatted(.number.rounded(increment: 1))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not related to the changes in this PR, but something I noticed: an improvement here would be to format a measurement, which would include the unit in a locale-specific way, modeling best practices.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I originally thought the same, but using the default measurement format style doesn't seem specific enough. I can override that measurement(width: .abbreviated, usage: .asProvided), but then it doesn't have locale specific units as you suggested. Would you still recommend going with locale units?

Current Default Measurement Format Style
Simulator Screenshot - iPhone 17 Pro - 2026-04-16 at 11 16 55-2 Simulator Screenshot - iPhone 17 Pro - 2026-04-16 at 11 07 31-2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The measurement value itself can be locale-specific as well (e.g. group separator), so yes, I would still suggest using a measurement and formatting that. Again, that is modeling best practices for our users, who may very well be localizing their app.

Also, you can still format the number how you want by passing a number format style to the numberFormatStyle parameter.

Co-authored-by: Philip Ridgeway <philip.ridgeway@gmail.com>
@CalebRas CalebRas requested a review from philium April 16, 2026 18:22
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