LocationServiceImpl
class LocationServiceImpl : LocationService
extension LocationServiceImpl: Mapper
Production implementation of LocationService
-
Handle dependency injection
Declaration
Swift
func inject(handler: LocationHandler)
Parameters
handler
Location handler
-
Current coordinate measured
Declaration
Swift
var current: CLLocationCoordinate2D? { get }
-
Last coordinate measured
Declaration
Swift
var here: CLLocationCoordinate2D? { get }
-
Last location contained in
Declaration
Swift
var inside: Location? { get }
-
Last calculated distances
Declaration
Swift
var distances: Distances { get }
-
Calculate nearest place of type
Declaration
Parameters
list
Checklist
id
Place ID
coordinate
Center
Return Value
Nearest place if found
-
Insert a typed tracker in our listeners
Declaration
Swift
func insert<T>(tracker: T) where T : LocationTracker, T : Hashable
Parameters
tracker
New listener
-
Remove a typed tracker from our listeners
Declaration
Swift
func remove<T>(tracker: T) where T : LocationTracker, T : Hashable
Parameters
tracker
Former listener
-
Request permission
Declaration
Swift
func request(permission: LocationPermission)
Parameters
permission
Permission
-
Start with intended permission
Declaration
Swift
func start(permission: LocationPermission)
Parameters
permission
Permission
-
Calculate distances
Declaration
Swift
func calculateDistances()
-
Show Add Photo screen
Declaration
Swift
func add(photo mappable: Mappable)
Parameters
mappable
Place
-
Show Add Post screen
Declaration
Swift
func add(post mappable: Mappable)
Parameters
mappable
Place
-
Close callout
Declaration
Swift
func close(mappable: Mappable)
Parameters
mappable
Place
-
Notify of visit
Declaration
Swift
func notify(mappable: Mappable, triggered: Date)
Parameters
mappable
Place
triggered
Date
-
Reveal on map
Declaration
Swift
func reveal(mappable: Mappable, callout: Bool)
Parameters
mappable
Place
callout
Show callout
-
Show Directions selector
Declaration
Swift
func show(directions mappable: Mappable)
Parameters
mappable
Place
-
Show Show More screen
Declaration
Swift
func show(more mappable: Mappable)
Parameters
mappable
Place
-
Show Nearby screen
Declaration
Swift
func show(nearby mappable: Mappable)
Parameters
mappable
Place
-
Update
Declaration
Swift
func update(mappable: Mappable)
Parameters
mappable
Place