• JMap.Layer.getEPSG4326Extent

    Returns the extent of the layer in ESPG:4326 coordinates

    Parameters

    • layerId: JId

      The JMap layer id

    Returns Promise<JBoundaryBox | null>

    Example

    // returns the bounding box (JBoundaryBox) of the layer ID "5d86a209-3a09-49d9-92f0-dce3c46bb23d" in decimal degrees
    JMap.Layer
    .getEPSG4326Extent("5d86a209-3a09-49d9-92f0-dce3c46bb23d")
    .then(extent => console.info("Extent of layer id=\"5d86a209-3a09-49d9-92f0-dce3c46bb23d\"", extent))
    .catch(error => console.error(error))

    Throws

    Error if no layer found for the id or if layer is a group