• JMap.MapContext.setDefaultContext

    Sets or unsets default map context, the change is persited server side.

    If a contextId is provided, sets the map context as the default one.

    If no context id is provided, unsets the current default context.

    Parameters

    • Optional contextId: JId

      the JMap map context id

    Returns Promise<void>

    Throws

    if context provided but not found, or server request error

    Example

    // set the map-context id=3 as the default one
    JMap.MapContext
    .setDefaultContext(3)
    .then(() => console.info(`Map context id=3 is now the default one`))
    .catch(error => console.error(error))

    // make no map-context as default JMap.MapContext .setDefaultContext() .then(() => console.info(No map context are default now)) .catch(error => console.error(error)) ```