Skip to content

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.

ParameterTypeDescription
geometryunknownAny GeoJSON geometry (Point, LineString, Polygon, the Multi* variants, or GeometryCollection). Loosely typed because the clicked feature reaches the interaction as any.

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.