react-globe.gl 2.19.0 → 2.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -26
- package/dist/react-globe.gl.d.ts +18 -18
- package/dist/react-globe.gl.js +13096 -13866
- package/dist/react-globe.gl.js.map +1 -1
- package/dist/react-globe.gl.min.js +4 -4
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ react-globe.gl
|
|
|
3
3
|
|
|
4
4
|
[![NPM package][npm-img]][npm-url]
|
|
5
5
|
[![Build Size][build-size-img]][build-size-url]
|
|
6
|
-
[![
|
|
6
|
+
[![NPM Downloads][npm-downloads-img]][npm-downloads-url]
|
|
7
7
|
|
|
8
8
|
React bindings for the [globe.gl](https://github.com/vasturiano/globe.gl) UI component.
|
|
9
9
|
|
|
@@ -31,6 +31,7 @@ Check out the examples:
|
|
|
31
31
|
* [Tiles](https://vasturiano.github.io/react-globe.gl/example/tiles/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/tiles/index.html))
|
|
32
32
|
* [Ripple Rings](https://vasturiano.github.io/react-globe.gl/example/random-rings/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/random-rings/index.html))
|
|
33
33
|
* [Emit Arcs on Click](https://vasturiano.github.io/react-globe.gl/example/emit-arcs-on-click/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/emit-arcs-on-click/index.html))
|
|
34
|
+
* [Clouds](https://vasturiano.github.io/react-globe.gl/example/clouds/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/clouds/index.html))
|
|
34
35
|
* [Solar Terminator](https://vasturiano.github.io/react-globe.gl/example/solar-terminator/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/solar-terminator/index.html))
|
|
35
36
|
* [Custom Globe Styling](https://vasturiano.github.io/react-globe.gl/example/custom-globe-styling/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/custom-globe-styling/index.html))
|
|
36
37
|
* [Custom Layer](https://vasturiano.github.io/react-globe.gl/example/custom-layer/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/custom-layer/index.html))
|
|
@@ -45,19 +46,19 @@ Check out the examples:
|
|
|
45
46
|
|
|
46
47
|
## Quick start
|
|
47
48
|
|
|
48
|
-
```
|
|
49
|
+
```js
|
|
49
50
|
import Globe from 'react-globe.gl';
|
|
50
51
|
```
|
|
51
52
|
|
|
52
53
|
or using a script tag
|
|
53
54
|
|
|
54
|
-
```
|
|
55
|
+
```html
|
|
55
56
|
<script src="//unpkg.com/react-globe.gl"></script>
|
|
56
57
|
```
|
|
57
58
|
|
|
58
59
|
then
|
|
59
60
|
|
|
60
|
-
```
|
|
61
|
+
```jsx
|
|
61
62
|
ReactDOM.render(
|
|
62
63
|
<Globe
|
|
63
64
|
pointsData={myData}
|
|
@@ -113,8 +114,8 @@ ReactDOM.render(
|
|
|
113
114
|
| <b>pointResolution</b> | <i>number</i> | 12 | Radial geometric resolution of each cylinder, expressed in how many slice segments to divide the circumference. Higher values yield smoother cylinders. |
|
|
114
115
|
| <b>pointsMerge</b> | <i>bool</i> | `false` | Whether to merge all the point meshes into a single ThreeJS object, for improved rendering performance. Visually both options are equivalent, setting this option only affects the internal organization of the ThreeJS objects. |
|
|
115
116
|
| <b>pointsTransitionDuration</b> | <i>number</i> | 1000 | Duration (ms) of the transition to animate point changes involving geometry modifications. A value of `0` will move the objects immediately to their final position. New objects are animated by scaling them from the ground up. Only works if `pointsMerge` is disabled. |
|
|
116
|
-
| <b>onPointClick</b> | <i>func</i>| *-* | Callback function for point (left-button) clicks. The point object
|
|
117
|
-
| <b>onPointRightClick</b> | <i>func</i>| *-* | Callback function for point right-clicks. The point object
|
|
117
|
+
| <b>onPointClick</b> | <i>func</i>| *-* | Callback function for point (left-button) clicks. The point object, the event object and the clicked coordinates are included as arguments: `onPointClick(point, event, { lat, lng, altitude })`. Only works if `pointsMerge` is disabled. |
|
|
118
|
+
| <b>onPointRightClick</b> | <i>func</i>| *-* | Callback function for point right-clicks. The point object, the event object and the clicked coordinates are included as arguments: `onPointRightClick(point, event, { lat, lng, altitude })`. Only works if `pointsMerge` is disabled. |
|
|
118
119
|
| <b>onPointHover</b> | <i>func</i>| *-* | Callback function for point mouse over events. The point object (or `null` if there's no point under the mouse line of sight) is included as the first argument, and the previous point object (or `null`) as second argument: `onPointHover(point, prevPoint)`. Only works if `pointsMerge` is disabled. |
|
|
119
120
|
|
|
120
121
|
### Arcs Layer
|
|
@@ -142,8 +143,8 @@ ReactDOM.render(
|
|
|
142
143
|
| <b>arcDashInitialGap</b> | <i>number</i>, <i>string</i> or <i>func</i> | 0 | Arc object accessor function, attribute or a numeric constant for the length of the initial gap before the first dash segment, in terms of relative line length. |
|
|
143
144
|
| <b>arcDashAnimateTime</b> | <i>number</i>, <i>string</i> or <i>func</i> | 0 | Arc object accessor function, attribute or a numeric constant for the time duration (in `ms`) to animate the motion of dash positions from the start to the end point for a full line length. A value of `0` disables the animation. |
|
|
144
145
|
| <b>arcsTransitionDuration</b> | <i>number</i> | 1000 | Duration (ms) of the transition to animate arc changes involving geometry modifications. A value of `0` will move the arcs immediately to their final position. New arcs are animated by rising them from the ground up. |
|
|
145
|
-
| <b>onArcClick</b> | <i>func</i>| *-* | Callback function for arc (left-button) clicks. The arc object
|
|
146
|
-
| <b>onArcRightClick</b> | <i>func</i>| *-* | Callback function for arc right-clicks. The arc object
|
|
146
|
+
| <b>onArcClick</b> | <i>func</i>| *-* | Callback function for arc (left-button) clicks. The arc object, the event object and the clicked coordinates are included as arguments: `onArcClick(arc, event, { lat, lng, altitude })`. |
|
|
147
|
+
| <b>onArcRightClick</b> | <i>func</i>| *-* | Callback function for arc right-clicks. The arc object, the event object and the clicked coordinates are included as arguments: `onArcRightClick(arc, event, { lat, lng, altitude })`. |
|
|
147
148
|
| <b>onArcHover</b> | <i>func</i>| *-* | Callback function for arc mouse over events. The arc object (or `null` if there's no arc under the mouse line of sight) is included as the first argument, and the previous arc object (or `null`) as second argument: `onArcHover(arc, prevArc)`. |
|
|
148
149
|
|
|
149
150
|
### Polygons Layer
|
|
@@ -165,8 +166,8 @@ ReactDOM.render(
|
|
|
165
166
|
| <b>polygonAltitude</b> | <i>number</i>, <i>string</i> or <i>func</i> | 0.01 | Polygon object accessor function, attribute or a numeric constant for the polygon cone's altitude in terms of globe radius units (`0` = 0 altitude (flat polygon), `1` = globe radius). |
|
|
166
167
|
| <b>polygonCapCurvatureResolution</b> | <i>number</i>, <i>string</i> or <i>func</i> | 5 | Polygon object accessor function, attribute or a numeric constant for the resolution (in angular degrees) of the cap surface curvature. The finer the resolution, the more the polygon is fragmented into smaller faces to approximate the spheric surface, at the cost of performance. |
|
|
167
168
|
| <b>polygonsTransitionDuration</b> | <i>number</i> | 1000 | Duration (ms) of the transition to animate polygon altitude changes. A value of `0` will size the cone immediately to their final altitude. New polygons are animated by rising them from the ground up. |
|
|
168
|
-
| <b>onPolygonClick</b> | <i>func</i> | *-* | Callback function for polygon (left-button) clicks. The polygon object
|
|
169
|
-
| <b>onPolygonRightClick</b> | <i>func</i> | *-* | Callback function for polygon right-clicks. The polygon object
|
|
169
|
+
| <b>onPolygonClick</b> | <i>func</i> | *-* | Callback function for polygon (left-button) clicks. The polygon object, the event object and the clicked coordinates are included as arguments: `onPolygonClick(polygon, event, { lat, lng, altitude })`. |
|
|
170
|
+
| <b>onPolygonRightClick</b> | <i>func</i> | *-* | Callback function for polygon right-clicks. The polygon object, the event object and the clicked coordinates are included as arguments: `onPolygonRightClick(polygon, event, { lat, lng, altitude })`. |
|
|
170
171
|
| <b>onPolygonHover</b> | <i>func</i> | *-* | Callback function for polygon mouse over events. The polygon object (or `null` if there's no polygon under the mouse line of sight) is included as the first argument, and the previous polygon object (or `null`) as second argument: `onPolygonHover(polygon, prevPolygon)`. |
|
|
171
172
|
|
|
172
173
|
### Paths Layer
|
|
@@ -191,8 +192,8 @@ ReactDOM.render(
|
|
|
191
192
|
| <b>pathDashInitialGap | <i>number</i>, <i>string</i> or <i>func</i> | 0 | Path object accessor function, attribute or a numeric constant for the length of the initial gap before the first dash segment, in terms of relative line length. |
|
|
192
193
|
| <b>pathDashAnimateTime | <i>number</i>, <i>string</i> or <i>func</i> | 0 | Path object accessor function, attribute or a numeric constant for the time duration (in `ms`) to animate the motion of dash positions from the start to the end point for a full line length. A value of `0` disables the animation. |
|
|
193
194
|
| <b>pathTransitionDuration | <i>number</i> | 1000 | Duration (ms) of the transition to animate path changes. A value of `0` will move the paths immediately to their final position. New paths are animated from start to end. |
|
|
194
|
-
| <b>onPathClick</b> | <i>func</i> | *-* | Callback function for path (left-button) clicks. The path object
|
|
195
|
-
| <b>onPathRightClick</b> | <i>func</i> | *-* | Callback function for path right-clicks. The path object
|
|
195
|
+
| <b>onPathClick</b> | <i>func</i> | *-* | Callback function for path (left-button) clicks. The path object, the event object and the clicked coordinates are included as arguments: `onPathClick(arc, event, { lat, lng, altitude })`. |
|
|
196
|
+
| <b>onPathRightClick</b> | <i>func</i> | *-* | Callback function for path right-clicks. The path object, the event object and the clicked coordinates are included as arguments: `onPathRightClick(arc, event, { lat, lng, altitude })`. |
|
|
196
197
|
| <b>onPathHover</b> | <i>func</i> | *-* | Callback function for path mouse over events. The path object (or `null` if there's no path under the mouse line of sight) is included as the first argument, and the previous path object (or `null`) as second argument: `onPathHover(path, prevPath)`. |
|
|
197
198
|
|
|
198
199
|
### Hex Bin Layer
|
|
@@ -216,8 +217,8 @@ ReactDOM.render(
|
|
|
216
217
|
| <b>hexSideColor</b> | <i>func</i> | `() => '#ffffaa'` | Accessor method for each hexagon's side color. The method should follow the signature: `hexSideColor(({ points, sumWeight, center: { lat, lng }}) => ...)` and return a color string. |
|
|
217
218
|
| <b>hexBinMerge</b> | <i>bool</i> | `false` | Whether to merge all the hexagon meshes into a single ThreeJS object, for improved rendering performance. Visually both options are equivalent, setting this option only affects the internal organization of the ThreeJS objects. |
|
|
218
219
|
| <b>hexTransitionDuration</b> | <i>number</i> | 1000 | Duration (ms) of the transition to animate hexagon changes related to geometry modifications (altitude, radius). A value of `0` will move the hexagons immediately to their final position. New hexagons are animated by scaling them from the ground up. Only works if `hexBinMerge` is disabled. |
|
|
219
|
-
| <b>onHexClick</b> | <i>func</i>| *-* | Callback function for hexagon (left-button) clicks. The hex object including all points binned
|
|
220
|
-
| <b>onHexRightClick</b> | <i>func</i>| *-* | Callback function for hexagon right-clicks. The hex object including all points binned
|
|
220
|
+
| <b>onHexClick</b> | <i>func</i>| *-* | Callback function for hexagon (left-button) clicks. The hex object including all points binned, the event object and the clicked coordinates are included as arguments: `onHexClick({ points, sumWeight, center: { lat, lng } }, event, { lat, lng, altitude })`. Only works if `hexBinMerge` is disabled. |
|
|
221
|
+
| <b>onHexRightClick</b> | <i>func</i>| *-* | Callback function for hexagon right-clicks. The hex object including all points binned, the event object and the clicked coordinates are included as arguments: `onHexRightClick({ points, sumWeight, center: { lat, lng } }, event, { lat, lng, altitude })`. Only works if `hexBinMerge` is disabled. |
|
|
221
222
|
| <b>onHexHover</b> | <i>func</i>| *-* | Callback function for hexagon mouse over events. The hex object (or `null` if there's no hex under the mouse line of sight) is included as the first argument, and the previous hex object (or `null`) as second argument: `onHexHover(hex, prevHex)`. Each hex object includes all points binned, and has the syntax: `{ points, sumWeight, center: { lat, lng } }`. Only works if `hexBinMerge` is disabled. |
|
|
222
223
|
|
|
223
224
|
### Hexed Polygons Layer
|
|
@@ -237,8 +238,8 @@ ReactDOM.render(
|
|
|
237
238
|
| <b>hexPolygonMargin</b> | <i>number</i>, <i>string</i> or <i>func</i> | 0.2 | Hexed polygon object accessor function, attribute or a numeric constant for the radial margin of each hexagon. Margins above `0` will create gaps between adjacent hexagons within a polygon. The margin is specified in terms of fraction of the hexagon's surface diameter. Values below `0` or above `1` are disadvised. |
|
|
238
239
|
| <b>hexPolygonCurvatureResolution</b> | <i>number</i>, <i>string</i> or <i>func</i> | 5 | Hexed polygon object accessor function, attribute or a numeric constant for the resolution (in angular degrees) of each hexed polygon surface curvature. The finer the resolution, the more the polygon hexes are fragmented into smaller faces to approximate the spheric surface, at the cost of performance. |
|
|
239
240
|
| <b>hexPolygonsTransitionDuration</b> | <i>number</i> | 0 | Duration (ms) of the transition to animate hexed polygons altitude and margin changes. A value of `0` will move the hexagons immediately to their final state. New hexed polygons are animated by sizing each hexagon from `0` radius. |
|
|
240
|
-
| <b>onHexPolygonClick</b> | <i>func</i> | *-* | Callback function for hexed polygon (left-button) clicks. The polygon object
|
|
241
|
-
| <b>onHexPolygonRightClick</b> | <i>func</i> | *-* | Callback function for hexed polygon right-clicks. The polygon object
|
|
241
|
+
| <b>onHexPolygonClick</b> | <i>func</i> | *-* | Callback function for hexed polygon (left-button) clicks. The polygon object, the event object and the clicked coordinates are included as arguments: `onHexPolygonClick(polygon, event, { lat, lng, altitude })`. |
|
|
242
|
+
| <b>onHexPolygonRightClick</b> | <i>func</i> | *-* | Callback function for hexed polygon right-clicks. The polygon object, the event object and the clicked coordinates are included as arguments: `onHexPolygonRightClick(polygon, event, { lat, lng, altitude })`. |
|
|
242
243
|
| <b>onHexPolygonHover</b> | <i>func</i> | *-* | Callback function for hexed polygon mouse over events. The polygon object (or `null` if there's no polygon under the mouse line of sight) is included as the first argument, and the previous polygon object (or `null`) as second argument: `onHexPolygonHover(polygon, prevPolygon)`. |
|
|
243
244
|
|
|
244
245
|
### Tiles Layer
|
|
@@ -260,8 +261,8 @@ ReactDOM.render(
|
|
|
260
261
|
| <b>tileMaterial</b> | <i>Material</i>, <i>string</i> or <i>func</i> | `() => new MeshLambertMaterial({ color: '#ffbb88' })` | Tile object accessor function, attribute or material object for the [ThreeJS material](https://threejs.org/docs/#api/en/materials/Material) used to style the segment's surface. |
|
|
261
262
|
| <b>tileCurvatureResolution</b> | <i>number</i>, <i>string</i> or <i>func</i> | 5 | Tile object accessor function, attribute or a numeric constant for the resolution (in angular degrees) of the surface curvature. The finer the resolution, the more the tile geometry is fragmented into smaller faces to approximate the spheric surface, at the cost of performance. |
|
|
262
263
|
| <b>tilesTransitionDuration</b> | <i>number</i> | 1000 | Duration (ms) of the transition to animate tile changes involving geometry modifications. A value of `0` will move the tiles immediately to their final position. New tiles are animated by scaling them from the centroid outwards. |
|
|
263
|
-
| <b>onTileClick</b> | <i>func</i> | *-* | Callback function for tile (left-button) clicks. The tile object
|
|
264
|
-
| <b>onTileRightClick</b> | <i>func</i> | *-* | Callback function for tile right-clicks. The tile object
|
|
264
|
+
| <b>onTileClick</b> | <i>func</i> | *-* | Callback function for tile (left-button) clicks. The tile object, the event object and the clicked coordinates are included as arguments: `onTileClick(tile, event, { lat, lng, altitude })`. |
|
|
265
|
+
| <b>onTileRightClick</b> | <i>func</i> | *-* | Callback function for tile right-clicks. The tile object, the event object and the clicked coordinates are included as arguments: `onTileRightClick(tile, event, { lat, lng, altitude })`. |
|
|
265
266
|
| <b>onTileHover</b> | <i>func</i> | *-* | Callback function for tile mouse over events. The tile object (or `null` if there's no tile under the mouse line of sight) is included as the first argument, and the previous tile object (or `null`) as second argument: `onTileHover(tile, prevTile)`. |
|
|
266
267
|
|
|
267
268
|
### Rings Layer
|
|
@@ -305,8 +306,8 @@ ReactDOM.render(
|
|
|
305
306
|
| <b>labelDotRadius</b> | <i>number</i>, <i>string</i> or <i>func</i> | 0.1 | Label object accessor function, attribute or a numeric constant for the radius of the dot marker, in angular degrees. |
|
|
306
307
|
| <b>labelDotOrientation</b> | <i>string</i> or <i>func</i> | `() => 'bottom'` | Label object accessor function or attribute for the orientation of the label if the dot marker is present. Possible values are `right`, `top` and `bottom`. |
|
|
307
308
|
| <b>labelsTransitionDuration</b> | <i>number</i> | 1000 | Duration (ms) of the transition to animate label changes involving position modifications (`lat`, `lng`, `altitude`, `rotation`). A value of `0` will move the labels immediately to their final position. New labels are animated by scaling their size. |
|
|
308
|
-
| <b>onLabelClick</b> | <i>func</i>| *-* | Callback function for label (left-button) clicks. The label object
|
|
309
|
-
| <b>onLabelRightClick</b> | <i>func</i>| *-* | Callback function for label right-clicks. The label object
|
|
309
|
+
| <b>onLabelClick</b> | <i>func</i>| *-* | Callback function for label (left-button) clicks. The label object, the event object and the clicked coordinates are included as arguments: `onLabelClick(label, event, { lat, lng, altitude })`. |
|
|
310
|
+
| <b>onLabelRightClick</b> | <i>func</i>| *-* | Callback function for label right-clicks. The label object, the event object and the clicked coordinates are included as arguments: `onLabelRightClick(label, event, { lat, lng, altitude })`. |
|
|
310
311
|
| <b>onLabelHover</b> | <i>func</i>| *-* | Callback function for label mouse over events. The label object (or `null` if there's no label under the mouse line of sight) is included as the first argument, and the previous label object (or `null`) as second argument: `onLabelHover(label, prevlabel)`. |
|
|
311
312
|
|
|
312
313
|
### Custom Layer
|
|
@@ -321,8 +322,8 @@ ReactDOM.render(
|
|
|
321
322
|
| <b>customLayerLabel</b> | <i>string</i> or <i>func</i> | `name` | Object accessor function or attribute for label (shown as tooltip). Supports plain text or HTML content. |
|
|
322
323
|
| <b>customThreeObject</b> | <i>Object3d</i>, <i>string</i> or <i>func</i>| *-* |Object accessor function or attribute for generating a custom 3d object to render as part of the custom map layer. Should return an instance of [ThreeJS Object3d](https://threejs.org/docs/index.html#api/core/Object3D). The callback method's signature includes the object's data as well as the globe radius: `customThreeObject((objData, globeRadius) => { ... })`. |
|
|
323
324
|
| <b>customThreeObjectUpdate</b> | <i>string</i> or <i>func</i>| *-* |Object accessor function or attribute for updating an existing custom 3d object with new data. This can be used for performance improvement on data updates as the objects don't need to be removed and recreated at each update. The callback method's signature includes the object to be update, its new data and the globe radius: `customThreeObjectUpdate((obj, objData, globeRadius) => { ... })`. |
|
|
324
|
-
| <b>onCustomLayerClick</b> | <i>func</i>| *-* | Callback function for custom object (left-button) clicks. The custom object
|
|
325
|
-
| <b>onCustomLayerRightClick</b> | <i>func</i>| *-* | Callback function for custom object right-clicks. The custom object
|
|
325
|
+
| <b>onCustomLayerClick</b> | <i>func</i>| *-* | Callback function for custom object (left-button) clicks. The custom object, the event object and the clicked coordinates are included as arguments: `onCustomLayerClick(obj, event, { lat, lng, altitude })`. |
|
|
326
|
+
| <b>onCustomLayerRightClick</b> | <i>func</i>| *-* | Callback function for custom object right-clicks. The custom object, the event object and the clicked coordinates are included as arguments: `onCustomLayerRightClick(obj, event, { lat, lng, altitude })`. |
|
|
326
327
|
| <b>onCustomLayerHover</b> | <i>func</i>| *-* | Callback function for custom object mouse over events. The custom object (or `null` if there's no object under the mouse line of sight) is included as the first argument, and the previous custom object (or `null`) as second argument: `onCustomLayerHover(obj, prevObj)`. |
|
|
327
328
|
|
|
328
329
|
### Render control
|
|
@@ -359,9 +360,9 @@ ReactDOM.render(
|
|
|
359
360
|
|
|
360
361
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=L398E7PKP47E8¤cy_code=USD&source=url) If this project has helped you and you'd like to contribute back, you can always [buy me a ☕](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=L398E7PKP47E8¤cy_code=USD&source=url)!
|
|
361
362
|
|
|
362
|
-
[npm-img]: https://img.shields.io/npm/v/react-globe.gl
|
|
363
|
+
[npm-img]: https://img.shields.io/npm/v/react-globe.gl
|
|
363
364
|
[npm-url]: https://npmjs.org/package/react-globe.gl
|
|
364
|
-
[build-size-img]: https://img.shields.io/bundlephobia/minzip/react-globe.gl
|
|
365
|
+
[build-size-img]: https://img.shields.io/bundlephobia/minzip/react-globe.gl
|
|
365
366
|
[build-size-url]: https://bundlephobia.com/result?p=react-globe.gl
|
|
366
|
-
[
|
|
367
|
-
[
|
|
367
|
+
[npm-downloads-img]: https://img.shields.io/npm/dt/react-globe.gl
|
|
368
|
+
[npm-downloads-url]: https://www.npmtrends.com/react-globe.gl
|
package/dist/react-globe.gl.d.ts
CHANGED
|
@@ -70,8 +70,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
70
70
|
pointsMerge?: boolean;
|
|
71
71
|
pointsTransitionDuration?: number;
|
|
72
72
|
pointLabel?: ObjAccessor<string>;
|
|
73
|
-
onPointClick?: (point: object, event: MouseEvent) => void;
|
|
74
|
-
onPointRightClick?: (point: object, event: MouseEvent) => void;
|
|
73
|
+
onPointClick?: (point: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
74
|
+
onPointRightClick?: (point: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
75
75
|
onPointHover?: (point: object | null, prevPoint: object | null) => void;
|
|
76
76
|
|
|
77
77
|
// Arcs layer
|
|
@@ -92,8 +92,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
92
92
|
arcDashAnimateTime?: ObjAccessor<number>;
|
|
93
93
|
arcsTransitionDuration?: number;
|
|
94
94
|
arcLabel?: ObjAccessor<string>;
|
|
95
|
-
onArcClick?: (arc: object, event: MouseEvent) => void;
|
|
96
|
-
onArcRightClick?: (arc: object, event: MouseEvent) => void;
|
|
95
|
+
onArcClick?: (arc: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
96
|
+
onArcRightClick?: (arc: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
97
97
|
onArcHover?: (arc: object | null, prevArc: object | null) => void;
|
|
98
98
|
|
|
99
99
|
// Polygons layer
|
|
@@ -108,8 +108,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
108
108
|
polygonCapCurvatureResolution?: ObjAccessor<number>;
|
|
109
109
|
polygonsTransitionDuration?: number;
|
|
110
110
|
polygonLabel?: ObjAccessor<string>;
|
|
111
|
-
onPolygonClick?: (polygon: object, event: MouseEvent) => void;
|
|
112
|
-
onPolygonRightClick?: (polygon: object, event: MouseEvent) => void;
|
|
111
|
+
onPolygonClick?: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
112
|
+
onPolygonRightClick?: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
113
113
|
onPolygonHover?: (polygon: object | null, prevPolygon: object | null) => void;
|
|
114
114
|
|
|
115
115
|
// Paths layer
|
|
@@ -127,8 +127,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
127
127
|
pathDashAnimateTime?: ObjAccessor<number>;
|
|
128
128
|
pathTransitionDuration?: number;
|
|
129
129
|
pathLabel?: ObjAccessor<string>;
|
|
130
|
-
onPathClick?: (path: object, event: MouseEvent) => void;
|
|
131
|
-
onPathRightClick?: (path: object, event: MouseEvent) => void;
|
|
130
|
+
onPathClick?: (path: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
131
|
+
onPathRightClick?: (path: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
132
132
|
onPathHover?: (path: object | null, prevPath: object | null) => void;
|
|
133
133
|
|
|
134
134
|
// Hex Bin layer
|
|
@@ -145,8 +145,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
145
145
|
hexBinMerge?: boolean;
|
|
146
146
|
hexTransitionDuration?: number;
|
|
147
147
|
hexLabel?: HexBinAccessor<string>;
|
|
148
|
-
onHexClick?: (hex: HexBin, event: MouseEvent) => void;
|
|
149
|
-
onHexRightClick?: (hex: HexBin, event: MouseEvent) => void;
|
|
148
|
+
onHexClick?: (hex: HexBin, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
149
|
+
onHexRightClick?: (hex: HexBin, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
150
150
|
onHexHover?: (hex: HexBin | null, prevHex: HexBin | null) => void;
|
|
151
151
|
|
|
152
152
|
// Hexed Polygons layer
|
|
@@ -159,8 +159,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
159
159
|
hexPolygonCurvatureResolution?: ObjAccessor<number>;
|
|
160
160
|
hexPolygonsTransitionDuration?: number;
|
|
161
161
|
hexPolygonLabel?: ObjAccessor<string>;
|
|
162
|
-
onHexPolygonClick?: (polygon: object, event: MouseEvent) => void;
|
|
163
|
-
onHexPolygonRightClick?: (polygon: object, event: MouseEvent) => void;
|
|
162
|
+
onHexPolygonClick?: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
163
|
+
onHexPolygonRightClick?: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
164
164
|
onHexPolygonHover?: (polygon: object | null, prevPolygon: object | null) => void;
|
|
165
165
|
|
|
166
166
|
// Tiles layer
|
|
@@ -175,8 +175,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
175
175
|
tileCurvatureResolution?: ObjAccessor<number>;
|
|
176
176
|
tilesTransitionDuration?: number;
|
|
177
177
|
tileLabel?: ObjAccessor<string>;
|
|
178
|
-
onTileClick?: (tile: object, event: MouseEvent) => void;
|
|
179
|
-
onTileRightClick?: (tile: object, event: MouseEvent) => void;
|
|
178
|
+
onTileClick?: (tile: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
179
|
+
onTileRightClick?: (tile: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
180
180
|
onTileHover?: (tile: object | null, prevTile: object | null) => void;
|
|
181
181
|
|
|
182
182
|
// Rings Layer
|
|
@@ -206,8 +206,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
206
206
|
labelDotOrientation?: ObjAccessor<LabelOrientation>;
|
|
207
207
|
labelsTransitionDuration?: number;
|
|
208
208
|
labelLabel?: ObjAccessor<string>;
|
|
209
|
-
onLabelClick?: (label: object, event: MouseEvent) => void;
|
|
210
|
-
onLabelRightClick?: (label: object, event: MouseEvent) => void;
|
|
209
|
+
onLabelClick?: (label: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
210
|
+
onLabelRightClick?: (label: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
211
211
|
onLabelHover?: (label: object | null, prevLabel: object | null) => void;
|
|
212
212
|
|
|
213
213
|
// Custom layer
|
|
@@ -215,8 +215,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
215
215
|
customThreeObject?: Object3D | string | ((d: object, globeRadius: number) => Object3D);
|
|
216
216
|
customThreeObjectUpdate?: string | ((obj: Object3D, objData: object, globeRadius: number) => void);
|
|
217
217
|
customLayerLabel?: ObjAccessor<string>;
|
|
218
|
-
onCustomLayerClick?: (obj: object, event: MouseEvent) => void;
|
|
219
|
-
onCustomLayerRightClick?: (obj: object, event: MouseEvent) => void;
|
|
218
|
+
onCustomLayerClick?: (obj: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
219
|
+
onCustomLayerRightClick?: (obj: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
220
220
|
onCustomLayerHover?: (obj: object | null, prevObj: object | null) => void;
|
|
221
221
|
|
|
222
222
|
// Render control
|