• JMap.Feature.propertiesUpdateById

    Change the feature properties for the given layer id, feature id and properties.

    Parameters

    Returns Promise<GeoJSON.Feature>

    Throws

    if layer or feature not found, or if properties are invalid

    Example

    const newProperties = { ... }
    // change the properties of feature id="4" on layer id="3"
    JMap.Feature
    .propertiesUpdateById({
    layerId: 3,
    featureId: 4,
    properties: newProperties
    })
    .then(feature => console.info("Feature properties' have been changed", feature))
    .catch(error => console.error("An error occured", error))