GeoLeaf Core API - v3.19.0
    Preparing search index...

    Function geometryBounds

    • The bounding box of a geometry, or null when it holds no valid position.

      Parameters

      • geometry: unknown

        A GeoJSON geometry (any type, collections included).

      Returns GeoLeafBounds | null

      The box, or null.

      geometryBounds({ type: "LineString", coordinates: [[1, 2], [3, 6]] });
      // { north: 6, south: 2, east: 3, west: 1 }