• JMap.Event.Layer.on.selectabilityWillChange

    This event is triggered just before a vector layer selectability is changed. This permits to act on selection before the layer selectability property is effectively changed

    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 vector layer selectability will change, it will display the next selectability
    // in the console
    JMap.Event.Layer.on.selectabilityWillChange(
    "custom-selectability-will-change",
    params => {
    console.log(`Vector layer id="${params.layerId}" next selectability="${params.selectability}"`)
    }
    )