PolylineSimplifierOptions.withMaxPointsAndTolerance constructor

PolylineSimplifierOptions.withMaxPointsAndTolerance(
  1. int maxPoints,
  2. int simplificationToleranceInMeters
)

Creates options with explicitly specified PolylineSimplifierOptions.maxPoints and PolylineSimplifierOptions.simplificationToleranceInMeters.

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 PolylineSimplifierOptions.maxPoints, then simplificationToleranceInMeters is ignored.

Default value is equal to PolylineSimplifierOptions.simplificationInMeters14ZoomLevel.

Implementation

PolylineSimplifierOptions.withMaxPointsAndTolerance(this.maxPoints, this.simplificationToleranceInMeters);