Example
Bounding Box
geometric.polygonBounds(polygon) returns the bounds of a polygon, ignoring points with invalid values (null, undefined, NaN, Infinity). The returned bounds are represented as an array of two points, where the first point is the top-left corner and the second point is the bottom-right corner.
Returns null if the polygon has fewer than three points.
Click to add polygon vertices and see polygonBounds return the top-left and bottom-right bounds.
Code