• JMap.Feature.getByIds

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

    Parameters

    • layerId: JId

      the JMap layer id

    • featureIds: JId[]

      the array of JMap feature ids

    Returns Promise<GeoJSON.Feature[]>

    Throws

    if layer or any of the features not found

    Example

    // returns the features of layer id="3" and feature id="4", "5" and "6"
    JMap.Feature
    .getByIds(3, [4, 5, 6])
    .then(features => console.info("Features has been fetched", features))
    .catch(error => console.error("An error occured", error))