• JMap.FormJMC.getJsonForm

    Returns the jsonForm schema and uiSchema for a layer.

    fetch the attributes of a layer and then builds and returns the schema and uiSchema required for jsonForms. The schemas will be null if there is no attributes on the layer

    Parameters

    • layerId: JId

      the JMap layer id

    Returns JJsonFormSchemas

    Example

    // returns the schema and uiSchema for layer id=f47ac10b-58cc-4372-a567-0e02b2c3d479


    JMap.FormJMC
    .getJsonForm("f47ac10b-58cc-4372-a567-0e02b2c3d479")
    .then(schemas => console.log("jsonForms schemas of layer f47ac10b-58cc-4372-a567-0e02b2c3d479", schemas))
    .catch(error => console.error("An error occurred when getting jsonForm schema", error))