FlyToInterpolator
public struct FlyToInterpolator
“fly-to” interpolator object that implements an “optimal path” animation
-
Interpolator object that implements an “optimal path” animation, as detailed in:
Van Wijk, Jarke J.; Nuij, Wim A. A. “Smooth and efficient zooming and panning.” INFOVIS ’03. pp. 15–22. https://www.win.tue.nl/~vanwijk/zoompan.pdf#page=5
Where applicable, local variable documentation begins with the associated variable or function in van Wijk (2003).
Declaration
Swift
public init?(from source: CameraOptions, to dest: CameraOptions, with mapCameraOptions: MapCameraOptions = MapCameraOptions(), size: CGSize)
Parameters
source
Start camera (parameters are NOT clamped to properties from MapCameraOptions)
dest
End camera (parameters ARE clamped to properties from MapCameraOptions)
mapCameraOptions
Camera-specific capabilities of the map, for example, min-zoom, max-pitch
size
Map View size in points
-
Calculates the coordinate given a fraction in [0,1].
Declaration
Swift
public func coordinate(at fraction: Double) -> CLLocationCoordinate2D
Parameters
fraction
Parameter between 0 and 1. 0 represents the start position, 1 the end position.
Return Value
coordinate