• JMap.MapContext.create

    Creates a map context. The map-context creation is persisted server-side.

    You just need to provide the context meta-data (= data that describe the context).

    The current map context will be saved.

    Parameters

    Returns Promise<JMapContext>

    the created map context, with it's id

    Throws

    if invalid map context data provided, or server request error

    Example

    // create a new map-context
    JMap.MapContext
    .create({
    title: "My city",
    description: "My city description",
    shareLink: false
    })
    .then(mapContext => console.info(`Map context id={mapContext.id} created !`))
    .catch(error => console.error(error))