Skip to content

Add BuildingAnnotation example with 3D building visualization#4818

Closed
aratcliffe wants to merge 7 commits intomapbox:mainfrom
aratcliffe:feature/building-annotation-example
Closed

Add BuildingAnnotation example with 3D building visualization#4818
aratcliffe wants to merge 7 commits intomapbox:mainfrom
aratcliffe:feature/building-annotation-example

Conversation

@aratcliffe
Copy link
Copy Markdown

Summary

This PR adds a new BuildingAnnotation example that demonstrates how to query and display 3D building annotations at the final destination during navigation.

Features

  • BuildingAnnotation struct - Value type for defining 3D building annotations with customizable properties (color, opacity, height, base elevation)
  • BuildingAnnotationManager - Manager class following iOS SDK annotation patterns (PointAnnotationManager, PolygonAnnotationManager)
  • NavigationMapView+BuildingQuery - Extension method for querying StandardBuildings at a coordinate
  • Example implementation - Multi-waypoint route in San Francisco with 4x simulation speed

Platform Support

All components are platform-agnostic and work with both UIKit and SwiftUI:

  • Query method works identically in both
  • Annotation struct and manager are framework-agnostic
  • Final waypoint detection pattern is the same (Coordinator pattern for SwiftUI)

Additional Changes

  • Added speedMultiplier parameter to LocationSource.simulation for faster testing

Testing

  • ✅ Builds successfully
  • ✅ Example registered in AdditionalExamples
  • ✅ Navigation works with 3 waypoints
  • ✅ Building annotation appears at final destination
  • ✅ 4x simulation speed works correctly

Related

This mirrors the Android BuildingAnnotation example functionality.

mapbox-github-ci-writer-1 Bot and others added 5 commits December 19, 2025 11:47
* Prepare iOS release 3.18.0-beta.1

* Update Dash changelog for v3.18.0-beta.1

* Examples SWIFT_TREAT_WARNINGS_AS_ERRORS = NO

* Fix Mapgpt typealias modules

---------

Co-authored-by: Roope Palomäki <roope.palomaki@mapbox.com>
(cherry picked from commit 67e3e10fedf09648560bcc511c5e1772b9ff7d59)
…oviders. (#11977)

(cherry picked from commit f8e714aee812ef5ecfdb2b2a9951f41f8a942c0c)
…#11890)

* Fix the initial non-cancellable auto-switch to the following camers

* Fix initial navigation camera padding in NavigationViewController

* Update tests

* Sync the initial camera state

(cherry picked from commit 42ae57fd72632512158f102a8228462aed4f148a)
Co-authored-by: Marcin Rufer <marcin.rufer@mapbox.com>
(cherry picked from commit cd99ad062213a1a1567b5bce95d4b5c50b526cf9)
This example demonstrates how to:
- Query StandardBuildings at the final destination
- Display a 3D building annotation using FillExtrusionLayer
- Detect arrival at the final waypoint

Features:
- BuildingAnnotation struct for defining 3D building annotations
- BuildingAnnotationManager for managing building annotations
- NavigationMapView+BuildingQuery extension for querying buildings
- Multi-waypoint route example with 4x simulation speed
- Platform-agnostic components that work with both UIKit and SwiftUI

Also adds speedMultiplier parameter to LocationSource.simulation for
faster testing of navigation examples.
@aratcliffe aratcliffe requested a review from a team as a code owner January 29, 2026 22:28
@aratcliffe
Copy link
Copy Markdown
Author

Closing as code is specific to a particular customer user case.

@aratcliffe aratcliffe closed this Jan 30, 2026
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.

3 participants