geometryBounds
geometryBounds(
geometry):Bounds|null
Defined in: packages/core/src/interactions/geometry-bounds.ts:98
The bounding box of a GeoJSON geometry, or null when there is nothing to
bound.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
geometry | unknown | Any GeoJSON geometry (Point, LineString, Polygon, the Multi* variants, or GeometryCollection). Loosely typed because the clicked feature reaches the interaction as any. |
Returns
Section titled “Returns”Bounds | null
[[minLng, minLat], [maxLng, maxLat]], degenerate for a single
point; null for a missing, empty, or coordinate-free geometry so the
caller can no-op instead of calling fitBounds with nothing.