• JMap.MapContext.setActive

    Activate or deactivate mapcontext functionality.

    If map context functionality is not active, user cannot access, create, update or delete context from the service.

    Parameters

    • isActive: boolean

      true to activate, else false

    Returns Promise<JMapContextSetActiveResult>

    Throws

    if user cannot use the mapcontext (anonymous or system user for example), or if state initialization failed

    Example

    // activate the mapcontext functionality
    JMap.MapContext.setActive(true)
    .then(result => console.info(result))
    .catch(error => console.error(error))

    // deactivate the mapcontext functionality
    JMap.MapContext.setActive(false)
    .then(result => console.info(result))
    .catch(error => console.error(error))