The JMap layer id
The full query id, for example "layers/2/attribute-queries/3"
if the layer or query id is invalid or the query does not exist
async function ensureQueryFormIsReady() {
const layerId = 2
const queryId = "layers/2/attribute-queries/3"
if (!JMap.Query.isFormInitialized(layerId, queryId)) {
await JMap.Query.initializeQueryFormById(layerId, queryId)
}
// The query form metadata is ready to use.
}
ensureQueryFormIsReady().catch(console.error)
JMap.Query.isFormInitialized
Returns true when the query form metadata is available. Returns false before loading, while loading, and after a loading error.