Options
public struct Options
Controls the strategy of PolylineSimplifier.simplify(...)
when reducing a size of polyline.
-
Value for simplification tolerance for 14 zoom level without significant artifacts.
Declaration
Swift
public static let simplificationInMeters14ZoomLevel: UInt64 -
Sets the upper limit on the resulting collection for the
PolylineSimplifier.simplify(...). Lower value results in the lower accuracy of the resulting polyline. IfmaxPointsis less than2then resulting polyline will not have an upper limit on the size and onlyPolylineSimplifier.Options.simplificationToleranceInMeterswill be considered. WhenmaxPointsis greater than size of the passed polyline then simplification algorithm will take into account onlyPolylineSimplifier.Options.simplificationToleranceInMeters.Declaration
Swift
public var maxPoints: UInt64 -
Sets the accuracy limit for the
PolylineSimplifier.simplify(...):- higher tolerance results in more simplification (fewer points);
- lower tolerance keeps the line closer to its original shape.
If removing a point produces polyline, which deviates from the original one more than
simplificationToleranceInMeters, then this point is left in the collection.If specified tolerance will not allow to create a polyline conforming to
PolylineSimplifier.Options.maxPoints, thensimplificationToleranceInMetersis ignored.Default value is equal to
PolylineSimplifier.Options.simplificationInMeters14ZoomLevel.Declaration
Swift
public var simplificationToleranceInMeters: UInt64 -
Undocumented
Declaration
Swift
public init(maxPoints: UInt64 = 0, simplificationToleranceInMeters: UInt64 = PolylineSimplifier.Options.simplificationInMeters14ZoomLevel)