the JMap layer id
the query id
// initializes query id="layers/2/attribute-queries/3" form of layer id=2, then returns the filled query
JMap.Query.initializeQueryFormById(2, "layers/2/attribute-queries/3")
.then(query => console.log("Query form has been loaded", query))
.catch(error => console.error("An error occured while loading query id='layers/2/attribute-queries/3'"))
JMap.Query.initializeQueryFormById
By default attribute query forms are not fetched from server, because sometime it takes too much time.
This method will fetch the query form.