Skip to content

Commit

Permalink
[docsprint] Add example to MapDataEvent (#9597)
Browse files Browse the repository at this point in the history
* add example to MapDataEvent

* fix copy paste mistake
  • Loading branch information
Colleen McGinnis authored Apr 20, 2020
1 parent 4bbd7f0 commit b0623b8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ui/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,15 @@ export type MapBoxZoomEvent = {
* the event is related to loading of a tile.
* @property {Coordinate} [coord] The coordinate of the tile if the event has a `dataType` of `source` and
* the event is related to loading of a tile.
* @example
* // The `sourcedata` event is an example of `MapDataEvent`.
* // Set up an event listener on the map.
* map.on('sourcedata', function(e) {
* if (e.isSourceLoaded) {
* // Do something when there are no more
* // outstanding network requests
* }
* });
*/
export type MapDataEvent = {
type: string,
Expand Down

0 comments on commit b0623b8

Please sign in to comment.