• JMap.Event.Layer.on.sourceChange

    This event is triggered when a layer's source has changed (for instance after modifying, adding or deleting a feature).

    Parameters

    • listenerId: string

      Your listener id (must be unique for all layer events)

    • fn: ((params) => void)

      Your listener function

    Returns void

    Example

    // Each time a layer's source has changed, it will display a message
    // in the console
    JMap.Event.Layer.on.sourceChange(
    "custom-source-change",
    params => {
    console.log(`Source for layer id="${params.layerId}" has changed"`)
    }
    )