WayCropper class

A utility class for cropping and simplifying way geometries to fit within a given bounding box (typically a map tile).

This is essential for rendering performance, as it reduces the number of vertices that need to be processed and drawn, especially for large polygons or long ways that only partially intersect a tile.

Constructors

WayCropper({required double maxDeviationPixel})

Properties

hashCode int
The hash code for this object.
no setterinherited
maxDeviationPixel double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cropOutsideWay(Wayholder wayholder, BoundingBox boundingBox) Wayholder?
An alternative cropping method that reduces the nodes of a way that are outside the given boundingBox.
cropWay(Wayholder wayholder, BoundingBox boundingBox, int maxZoomlevel) Wayholder?
Crops the ways within a wayholder to the given boundingBox.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited