Methods
(inner) initLizmapApp() → {void}
Init Lizmap application This function is called when the Lizmap application is ready to be initialized. It is called when the global lizMap object is ready and the DOM is ready too. It added properties to the global lizMap object and initialize the Lizmap application.
Returns:
- Type
- void
(async, inner) waitFor(maxWait, sleepStep, f) → {Promise.<number>}
waitFor function returns waiting time in milliseconds
Parameters:
Name | Type | Description |
---|---|---|
maxWait |
number | maximum waiting time in milliseconds |
sleepStep |
number | initial sleep step in milliseconds |
f |
function | function to wait for that returns a boolean value |
Returns:
- waiting time in milliseconds
- Type
- Promise.<number>
Example
const waitingTime = await waitFor(1000, 10, () => document.readyState === 'complete');
console.log(`Waiting time: ${waitingTime}ms`);