• JMap.Project.activateById

    Activate a project on the map, for a given project id.

    User session rigths are checked server side and an error is thrown if user doesn't have the access right for the project.

    Parameters

    • projectId: JId

      The JMap project id

    Returns JProject

    a promise that is resolved when the project has been loaded successfully

    Throws

    Error missing project id or if project is not found

    Example

    try {
    // activate project id=2
    const project = JMap.Project.activateById(2)
    console.info(`Project id=${project.id} has been activated.`, project)
    } catch (error) {
    console.error(`Cannot activate the project : ${error}`)
    }