• JMap.MapContext.deleteContextById

    Deletes the map context for a given id.

    The map-context deletion is persisted server-side.

    This is a full delete.

    Parameters

    • contextId: JId | JId[]

      the JMap map context id or an array of map context ids

    Returns Promise<void>

    Throws

    if map-context not found, or server request error

    Example

    // deletes the map-context id=5
    JMap.MapContext
    .deleteContextById(5)
    .then(() => console.info("Context 5 deleted !"))
    .catch(error => console.error(error))

    // deletes map-contexts id in [ 3, 5, 12 ]
    JMap.MapContext
    .deleteContextById([ 3, 5, 12 ])
    .then(() => console.info("Three map contexts have been deleted !"))
    .catch(error => console.error(error))