• JMap.Form.submit

    Submit the currently displayed form.

    Parameters

    Returns Promise<JFormSubmitResult>

    Throws

    if no form displayed

    Example

     const layerId = 3
    const featureId = 4
    const feature = await JMap.Feature.getById(layerId, featureId)
    // opens form update dialog for one element of layer id=3
    await JMap.Form.openUpdateDialogForLayer(
    layerId,
    [{
    id: featureId,
    attributeValueByName: feature.properties
    }]
    )
    const form = JMap.Form.getAttributeForm()
    // change some values of the attribute form
    JMap.Form.setFormValues(form, {
    color: "white",
    type: "tree"
    })
    JMap.Form
    .submit()
    .then(result => console.log("Submit result", result))
    .catch(error => console.error(error))