TKUIMapManager
@MainActor
open class TKUIMapManager : TGMapManager
The base class for map managers in TripKitUI
The following diagram illustrates the relationships:
┌────────────────────────────────────────────────────────────────────┐
│ TGCardViewController │
│ ┏━━━━━━━━━━━━━━━━━━━┓ ╔════════════════════════╗ │
│ ┃TGMapManager ┃─ ─ ─Implements ─ ▶║TGCompatibleMapManager ║ │
│ ┗━━━━━━━━━━━━━━━━━━━┛ ╚════════════════════════╝ │
└───────────▲────────────────────────────────────────────────────────┘
│
Subclass──────────────────┐
│ │
┌───────────┼─────────────────────┼──────────────────────────────────┐
│ TripKitUI │ │ │
│ ┏━━━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━┓ │
│ ┃TKUIMapManager ┃ ┃TKUIComposingMap...┃ │
│ ┗━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━┛ │
│ ▲ │
│ Subclass──────────────────┬─────────────────────┐ │
│ │ │ │ │
│ ┏━━━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━┓ │
│ ┃TKUIServiceMapMa...┃ ┃TKUIRoutingResul...┃ ┃TKUITripMapManager ┃ │
│ ┗━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━┛ │
└────────────────────────────────────────────────────────────────────┘
-
A factory that all map managers will use as for the default annotations.
- default: TKUIAnnotationViewBuilder
Declaration
Swift
@MainActor public static var annotationBuilderFactory: ((MKAnnotation, MKMapView) -> TKUIAnnotationViewBuilder)
-
The POI categories from Apple Maps to never show on the map, e.g., as they are added separately.
Declaration
Swift
@MainActor public static var pointsOfInterestsToExclude: [MKPointOfInterestCategory]
-
Callback that fires when attributions need to be displayed. In particular when using
tiles
.Declaration
Swift
@MainActor public var attributionDisplayer: (([TKAPI.DataAttribution], _ sender: UIView) -> Void)?
-
Whether user interaction for selecting annotation is enabled, defaults to
true
.Declaration
Swift
@MainActor open var annotationSelectionEnabled: Bool { get set }
-
The identifier for what should be drawn as selected on the map
Declaration
Swift
@MainActor public var selectionIdentifier: String? { get set }
-
Undocumented
Declaration
Swift
@MainActor public var selectionMode: TKUIPolylineRenderer.SelectionMode
-
Overlays on the map, which are typically routes in TripKit
As soon as you set this, the routes will be added to the map.
Declaration
Swift
@MainActor public var overlays: [any MKOverlay] { get set }
-
Annotation that should be animated in and out when appearing and disappearing. Also, when updating this array, only the differnces will be animated for any annotations conforming to
TKUIIdentifiableAnnotation
Declaration
Swift
@MainActor public var animatedAnnotations: [any MKAnnotation] { get set }
-
Annotations where each annotation can dynamically change, e.g., changing its coordinate, title/subtitle, and preferred alpha
Declaration
Swift
@MainActor public var dynamicAnnotations: [any MKAnnotation] { get set }
-
Declaration
Swift
@MainActor override open func takeCharge(of mapView: MKMapView, animated: Bool)
-
Declaration
Swift
@MainActor override open func cleanUp(_ mapView: MKMapView, animated: Bool)
-
Undocumented
Declaration
Swift
@MainActor open func annotationBuilder(for annotation: MKAnnotation, in mapView: MKMapView) -> TKUIAnnotationViewBuilder
-
Call this to trigger an update of dynamic annotations, such as real-time vehicles.
Declaration
Swift
@objc @MainActor open func updateDynamicAnnotations(animated: Bool = false)
-
Undocumented
Declaration
Swift
@MainActor open func mapView(_ mapView: MKMapView, didAdd views: [MKAnnotationView])
-
Undocumented
Declaration
Swift
@MainActor open func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView?
-
Undocumented
Declaration
Swift
@MainActor open func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer
-
Undocumented
Declaration
Swift
@MainActor open func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool)
-
Undocumented
Declaration
Swift
@MainActor open func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView)