• JMap.Projection.reprojectBoundaryBox

    Returns the reprojected boundary box in the given projection.

    Parameters

    • boundaryBox: JBoundaryBox

      the boundary box to reproject

    • toProjection: string

      the desired output projection (EPSG code)

    • Optional fromProjection: string

      projection of the given location, by default the project projection (EPSG code)

    Returns Promise<JBoundaryBox>

    Throws

    if invalid parameters

    Example

    // returns the boundary box in long/lat
    const longLatBbox = await JMap.Projection.reprojectBoundaryBox({
    x: -8251305.053809433,
    y: 5683448.361086178
    },
    "EPSG:4326",
    "EPSG:3857"
    )
    console.log("Long/lat boundary box", longLatBbox)