Please make sure, you arrange your parameters like this:
Longitude 1, Latitude 1, Altitude 1 (optional), Longitude 2, Latitude 2, Altitude 2 (optional)
You can either specify 4 or 6 parameters
If you are using the default constructor with two dimensional positions (lng + lat only), please use the constructor like this:
BBox(lng1, lat1, lng2, lat2);
Takes a Feature or FeatureCollection and truncates the precision of the geometry.
precision sets the coordinate decimal precision
coordinates sets the maximum number of coordinates (primarly used to remove z coordinates)
mutate allows GeoJSONObject input to be mutated (significant performance increase if true)
Returns GeoJSONObject layer with truncated geometry
example:
var point = Point(coordinates: Position.of(
70.46923055566859,
58.11088890802906,
1508
));
var truncated = truncate(point, precision: 3, coordinates: 2);
//=truncated.geometry.coordinates => 70.469, 58.111
//addToMap
var addToMap = truncated;