• JMap.Feature.deleteById

    Deletes the feature for the given layer and feature ids.

    Parameters

    • layerId: JId

      the JMap layer id

    • featureId: JId

      the JMap feature id

    Returns Promise<GeoJSON.Feature>

    Throws

    if layer or feature not found

    Example

    // deletes the feature id="4" on layer id="3"
    JMap.Feature
    .deleteById(3, 4)
    .then(deletedFeature => console.info("Feature has been deleted", deletedFeature))
    .catch(error => console.error("An error occured", error))