• JMap.Project.activateByName

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

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

    Parameters

    • projectName: string

      The JMap project name

    Returns JProject

    the project

    Throws

    if missing project name or if project not found

    Example

    try {
    // activate project name="My city"
    const project = JMap.Project.activateByName("My city")
    console.info(`Project id=${project.id} has been activated.`, project)
    } catch (error) {
    console.error(`Cannot activate the project : ${error}`)
    }