You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add *data and *dataloading events
* Remove "tile" data events, make them all "source" data events
* Add MapDataEvent#isSourceLoaded and MapDataEvent#source properties
* Restore the tile data type
* Update map.js
* Refactored to reduce diff size
@@ -1596,26 +1602,92 @@ function removeNode(node) {
1596
1602
*/
1597
1603
1598
1604
/**
1599
-
* Fired when any map data (style, source, tile, etc) loads or changes. See
1600
-
* [`MapDataEvent`](#MapDataEvent) for more information.
1605
+
* Fired when any map data loads or changes. See [`MapDataEvent`](#MapDataEvent)
1606
+
* for more information.
1601
1607
*
1602
1608
* @event data
1603
1609
* @memberof Map
1604
1610
* @instance
1605
1611
* @property {MapDataEvent} data
1606
1612
*/
1607
1613
1614
+
/**
1615
+
* Fired when the map's style loads or changes. See
1616
+
* [`MapDataEvent`](#MapDataEvent) for more information.
1617
+
*
1618
+
* @event styledata
1619
+
* @memberof Map
1620
+
* @instance
1621
+
* @property {MapDataEvent} data
1622
+
*/
1623
+
1624
+
/**
1625
+
* Fired when one of the map's sources loads or changes. This event is not fired
1626
+
* if a tile belonging to a source loads or changes (that is handled by
1627
+
* `tiledata`). See [`MapDataEvent`](#MapDataEvent) for more information.
1628
+
*
1629
+
* @event sourcedata
1630
+
* @memberof Map
1631
+
* @instance
1632
+
* @property {MapDataEvent} data
1633
+
*/
1634
+
1608
1635
/**
1609
-
* Fired when any map data (style, source, tile, etc) begins loading or
1610
-
* changing asyncronously. All `dataloading` events are followed by a `data`
1611
-
* or `error` event. See [`MapDataEvent`](#MapDataEvent) for more information.
1636
+
* Fired when one of the map's sources' tiles loads or changes. See
1637
+
* [`MapDataEvent`](#MapDataEvent) for more information.
1612
1638
*
1613
-
* @eventdataloading
1639
+
* @eventtiledata
1614
1640
* @memberof Map
1615
1641
* @instance
1616
1642
* @property {MapDataEvent} data
1617
1643
*/
1618
1644
1645
+
/**
1646
+
* Fired when any map data (style, source, tile, etc) begins loading or
1647
+
* changing asyncronously. All `dataloading` events are followed by a `data`
1648
+
* or `error` event. See [`MapDataEvent`](#MapDataEvent) for more information.
1649
+
*
1650
+
* @event dataloading
1651
+
* @memberof Map
1652
+
* @instance
1653
+
* @property {MapDataEvent} data
1654
+
*/
1655
+
1656
+
/**
1657
+
* Fired when the map's style begins loading or changing asyncronously.
1658
+
* All `styledataloading` events are followed by a `styledata`
1659
+
* or `error` event. See [`MapDataEvent`](#MapDataEvent) for more information.
1660
+
*
1661
+
* @event styledataloading
1662
+
* @memberof Map
1663
+
* @instance
1664
+
* @property {MapDataEvent} data
1665
+
*/
1666
+
1667
+
/**
1668
+
* Fired when one of the map's sources begins loading or changing asyncronously.
1669
+
* This event is not fired if a tile belonging to a source begins loading or
1670
+
* changing (that is handled by `tiledataloading`). All `sourcedataloading`
1671
+
* events are followed by a `sourcedata` or `error` event. See
1672
+
* [`MapDataEvent`](#MapDataEvent) for more information.
1673
+
*
1674
+
* @event sourcedataloading
1675
+
* @memberof Map
1676
+
* @instance
1677
+
* @property {MapDataEvent} data
1678
+
*/
1679
+
1680
+
/**
1681
+
* Fired when one of the map's sources' tiles begins loading or changing
1682
+
* asyncronously. All `tiledataloading` events are followed by a `tiledata`
1683
+
* or `error` event. See [`MapDataEvent`](#MapDataEvent) for more information.
1684
+
*
1685
+
* @event tiledataloading
1686
+
* @memberof Map
1687
+
* @instance
1688
+
* @property {MapDataEvent} data
1689
+
*/
1690
+
1619
1691
/**
1620
1692
* A `MapDataEvent` object is emitted with the [`Map#data`](#Map.event:data)
1621
1693
* and [`Map#dataloading`](#Map.event:dataloading) events. Possible values for
@@ -1627,7 +1699,10 @@ function removeNode(node) {
1627
1699
*
1628
1700
* @typedef {Object} MapDataEvent
1629
1701
* @property {string} type The event type.
1630
-
* @property {string} dataType The type of data that has changed. One of `'source'`, `'style'`, or `'tile'`.
1702
+
* @property {string} dataType The type of data that has changed. One of `'source'`, `'style'`.
1703
+
* @property {boolean} [isSourceLoaded] True if the event has a `dataType` of `source` and the source has no outstanding network requests.
1704
+
* @property {Object} [source] The [style spec representation of the source](https://www.mapbox.com/mapbox-gl-style-spec/#sources) if the event has a `dataType` of `source`.
1705
+
* @property {Coordinate} [coord] The coordinate of the tile if the event has a `dataType` of `tile`.
0 commit comments