• JMap.Event.MapContext.on.afterMapDataChange

    This event is triggered after a context map data is created or updated.

    This event is not triggered when a context metadata is changed: title, description, default context, etc...

    You can access extension data from this event, see example below.

    Parameters

    Returns void

    Example

    // Triggered after a map-context is created or updated
    JMap.Event.MapContext.on.afterMapDataChange("my-after-map-data-change-listener", params => {
    console.info(`After map data change for context id="${params.context.title}"`, params.context)
    console.info(`Is creation ="${params.isCreation}"`) // creation or update
    const isExtensionDataSet = params.isExtensionDataSetById("my-extension")
    if (isExtensionDataSet) {
    console.info("Saved extension data", params.getExtensionDataById("my-extension"))
    } else {
    console.info("No extension data")
    }
    })