• JMap.Feature.getByLayerId

    Returns the feature (EPSG:4326 projection) for the given layer and bbox.

    Parameters

    Returns Promise<GeoJSON.Feature[]>

    Throws

    if layer not found or bbox is invalid

    Example

    // returns the feature of layer id="36885146-7eed-4071-9f86-8e29c505af91" and bbox
    JMap.Feature.getByLayer("36885146-7eed-4071-9f86-8e29c505af91", {
    ne: {
    x: -73.69935286533261,
    y: 45.51487645603402
    },
    sw: {
    x: -73.78637009135603,
    y: 45.47581946298703
    }
    })
    .then(features => console.info("Features has been fetched", features))
    .catch(error => console.error("An error occured", error))