• 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="3" and bbox
    JMap.Feature.getByLayer(3, {
    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))