• JMap.MapContext.setLinkShare

    Updates a map context link share state, without changing the map data.

    The map-context link share state is persisted server-side.

    Parameters

    • contextId: JId

      the JMap map context id

    • isShared: boolean

      true if the link is shared, else false

    Returns Promise<void>

    Throws

    if context not found, or empty title, or server request error

    Example

    // update the map-context id=3 link share state to true
    JMap.MapContext
    .setLinkShare(3, true)
    .then(() => console.info(`Map context id=3 is now shared`))
    .catch(error => console.error(error))