TKUIMapManager
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
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
public static var pointsOfInterestsToExclude: [MKPointOfInterestCategory]
-
Callback that fires when attributions need to be displayed. In particular when using
tiles
.Declaration
Swift
public var attributionDisplayer: (([TKAPI.DataAttribution], _ sender: UIView) -> Void)?
-
Whether user interaction for selecting annotation is enabled, defaults to
true
.Declaration
Swift
open var annotationSelectionEnabled: Bool { get set }
-
The identifier for what should be drawn as selected on the map
Declaration
Swift
public var selectionIdentifier: String? { get set }
-
Undocumented
Declaration
Swift
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
public var overlays: [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
public var animatedAnnotations: [MKAnnotation] { get set }
-
Annotations where each annotation can dynamically change, e.g., changing its coordinate, title/subtitle, and preferred alpha
Declaration
Swift
public var dynamicAnnotations: [MKAnnotation] { get set }
-
Declaration
Swift
override open func takeCharge(of mapView: MKMapView, animated: Bool)
-
Declaration
Swift
override open func cleanUp(_ mapView: MKMapView, animated: Bool)
-
Undocumented
Declaration
Swift
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 open func updateDynamicAnnotations(animated: Bool = false)
-
Undocumented
Declaration
Swift
open func mapView(_ mapView: MKMapView, didAdd views: [MKAnnotationView])
-
Undocumented
Declaration
Swift
open func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView?
-
Undocumented
Declaration
Swift
open func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer
-
Undocumented
Declaration
Swift
open func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool)
-
Undocumented
Declaration
Swift
open func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView)