• JMap.Form.getFormsMetaDataByLayerId

    Returns all forms metadata for a given layer id.

    Fecthes data from server first time, then keeps it in cache for the next time.

    Parameters

    • layerId: JId

      the JMap layer id

    Returns Promise<JFormMetaData[]>

    Throws

    if layer not found

    Example

    // returns all forms metadata for layer id=3
    JMap.Form
    .getFormsMetaDataByLayerId(3)
    .then(formsMetadata => console.log("Forms metatada of layer 3", formsMetadata))
    .catch(error => console.error("An error occurred when getting form metadata", error))