POIKitManager
class POIKitManager : NSObject, CLLocationManagerDelegate
Undocumented
-
Undocumented
Declaration
Swift
public weak var delegate: POIKitDelegate?
-
Undocumented
Declaration
Swift
public var location: CLLocation? { get }
-
Undocumented
Declaration
Swift
public var locationServiceState: LocationServiceState { get }
-
Undocumented
Declaration
Swift
public var locationAccuracyState: LocationAccuracyState { get }
-
Undocumented
Declaration
Swift
public func start()
-
Undocumented
Declaration
Swift
public func stop()
-
Undocumented
Declaration
Swift
public func observe(delegate: POIKitObserverTokenDelegate, poisOfType: POILayer, boundingBox: BoundingBox, maxDistance: (distance: Double, padding: Double)? = nil, handler: @escaping (Bool, Result<[GasStation], Error>) -> Void) -> BoundingBoxNotificationToken
-
Undocumented
Declaration
Swift
public func observe(delegate: POIKitObserverTokenDelegate, uuids: [String], handler: @escaping (Bool, Result<[GasStation], Error>) -> Void) -> UUIDNotificationToken
-
Undocumented
Declaration
Swift
public func fetchPOIs(poisOfType: POILayer, boundingBox: POIKit.BoundingBox, handler: @escaping (Result<[GasStation], Error>) -> Void) -> URLSessionTask?
-
Undocumented
Declaration
Swift
public func loadPOIs(poisOfType: POILayer, boundingBox: BoundingBox, handler: @escaping (Result<[GasStation], Error>) -> Void) -> URLSessionTask?
-
Undocumented
Declaration
Swift
public func loadPOIs(uuids: [String], handler: @escaping (Result<[GasStation], Error>) -> Void) -> URLSessionTask?
-
Retrieves a route for a navigation request.
Declaration
Swift
public func route(for request: NavigationRequest, handler: ((NavigationResponse?, POIKitAPIError) -> Void)? = nil)
Parameters
request
request with the coordinates for the route and more parameters to restrict the search
handler
block called with the calculated route or error if search failed
-
Search for a text with the given parameters
Declaration
Swift
public func search(_ request: AddressSearchRequest, handler: ((GeoJSONResult?, POIKitAPIError?) -> Void)? = nil)
Parameters
request
search request restricting the search
handler
block called with the search response or error if the request failed
-
Searches for address results used as search suggestions for the user
Declaration
Swift
public func autocomplete(_ request: AddressSearchRequest, isThrottled: Bool, handler: ((GeoJSONResult?, POIKitAPIError?) -> Void)? = nil)
Parameters
request
search request restricting the search
handler
block called with the search response or error if the request failed
-
Reverse geocode a location with the given parameters
Declaration
Swift
public func reverseGeocode(_ request: ReverseGeocodeRequest, handler: ((GeoJSONResult?, POIKitAPIError) -> Void)? = nil)
Parameters
request
reverse geocode request restricting the location
handler
block called with the reverse geocode response or error if the request failed
-
Fetches the regional price for a given coordinate.
Declaration
Swift
public func getRegionalPrice(for coordinates: CLLocationCoordinate2D, result: @escaping (Result<RegionalPricesResponse, Error>) -> Void)
Parameters
coordinate
Coordinate to fetch the result for
result
Result block called with either the response or an error message.
-
Fetches the filters for a given coordinate from the metadata endpoint
Declaration
Swift
public func getFilters(for coordinates: CLLocationCoordinate2D, result: @escaping (Result<POIFiltersResponse, Error>) -> Void)
Parameters
coordinate
Coordinate to fetch the result for
result
Result block called with either the response or an error message.
-
Fetches the price history for a given id, fuelType and period of time.
Declaration
Swift
public func getPriceHistory(for id: String, fuelType: String, from: String, to: String, result: @escaping (Result<PCPriceHistory, Error>) -> Void)
Parameters
id
UUID of the gas station
fuelType
Desired fuelType of the prices
from
Desired start date of prices (needs to be in )
result
Result block called with either the response or an error message.
-
Undocumented
Declaration
Swift
public func checkIfGasStationChanged(for id: String, result: @escaping (Result<GasStationResponse, Error>) -> Void)
-
Undocumented
Declaration
Swift
public func getGasStation(for id: String, result: @escaping (Result<GasStationResponse, Error>) -> Void)
-
Undocumented
Declaration
Swift
public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])
-
Undocumented
Declaration
Swift
public func locationManager(_ manager: CLLocationManager, didUpdateHeading newHeading: CLHeading)
-
Undocumented
Declaration
Swift
public func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus)
-
Undocumented
Declaration
Swift
public func locationManager(_ manager: CLLocationManager, didFailWithError error: Error)