Optional
params: JMapContextMetaDatathe complete map context meta-data
the created map context, with it's id
if invalid map context data provided, or server request error
// 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))
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.