TKUICompatibleHomeMapManager
@MainActor
public protocol TKUICompatibleHomeMapManager : TGCompatibleMapManager
This protocol defines the requirements for any map managers that want
to take control of the map in a TKUIHomeCard
-
nextFromMap
Default implementationThis returns an observable sequence that emits an element whenever an action is triggered on the map
Default Implementation
Declaration
Swift
var nextFromMap: Observable<TKUIHomeCard.ComponentAction> { get }
-
This returns an observable sequence that emits an element whenever the map’s mapRect changes
Declaration
Swift
var mapRect: Driver<MKMapRect> { get }
-
onHomeCardAppearance(_:
Default implementation) This provides you an opportunity to perform actions on the map when a
TKUIHomeCard
appearsDefault Implementation
Declaration
Swift
func onHomeCardAppearance(_ appear: Bool)
Parameters
appear
true
when a home card just appeared -
This is called when the user searches for and selects a city
Declaration
Swift
func zoom(to city: TKRegion.City, animated: Bool)
-
This allows the map manager to respond to a
TKUIHomeCard
‘s request to select an annotation on the mapDeclaration
Swift
func select(_ annotation: MKAnnotation)
Parameters
annotation
The annotation to select on the map.