Clarify documentation for map.loaded(), map.isStyleLoaded()
Open
@domlet is already working on this.
Since Jul 9, 2021.
api :memo:
docs :scroll:
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
mapbox-gl-js version: 0.45.0
Refs https://github.com/mapbox/mapbox-gl-js/issues/6707
The documentation for map.loaded() and map.isStyleLoaded() do not make it clear what the difference is between them.
/**
* Returns a Boolean indicating whether the map is fully loaded.
*
* Returns `false` if the style is not yet fully loaded,
* or if there has been a change to the sources or style that
* has not yet fully loaded.
*
* @returns {boolean} A Boolean indicating whether the map is fully loaded.
*/
loaded()
/**
* Returns a Boolean indicating whether the map's style is fully loaded.
*
* @returns {boolean} A Boolean indicating whether the style is fully loaded.
*/
isStyleLoaded()
It should be clear from reading the docs:
- What "fully loaded" means / what might cause it to be not true.
- Under what conditions
map.loaded() !== map.isStyleLoaded()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.