mapbox / mapbox/mapbox-gl-js

documentation: document the event object passed in event handlers

Open
#10,840 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs :scroll:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

The documentation shows event handlers as not having any input parameters.

It seems that the event is passed in and has this form:

{type: "load", target: Map}

Is it possible to document this event argument?

-----------------
https://docs.mapbox.com/mapbox-gl-js/api/map/#map.event:load

Fired immediately after all necessary resources have been downloaded and the first visually complete rendering of the map has occurred.

Example
```
// Initialize the map
var map = new mapboxgl.Map({ // map options });
// Set an event listener that fires
// when the map has finished loading.
map.on('load', function() {
console.log('A load event occurred.');
});
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Map.event:load documentation page linked in the issue and inspect how event handlers and event objects are described elsewhere in the API documentation. Document the event argument and its shown shape for the load handler, while keeping the example consistent with the documented signature.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.