globe.gl 2.23.0 → 2.24.0

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 CHANGED
@@ -125,8 +125,8 @@ Globe({ configOptions })(<domElement>)
125
125
  | <b>pointResolution</b>([<i>num</i>]) | Getter/setter for the radial geometric resolution of each cylinder, expressed in how many slice segments to divide the circumference. Higher values yield smoother cylinders. | 12 |
126
126
  | <b>pointsMerge</b>([<i>boolean</i>]) | Getter/setter for 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. | `false` |
127
127
  | <b>pointsTransitionDuration</b>([<i>num</i>]) | Getter/setter for 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. | 1000 |
128
- | <b>onPointClick</b>(<i>fn</i>) | Callback function for point (left-button) clicks. The point object and the event object are included as arguments: `onPointClick(point, event)`. Only works if `pointsMerge` is disabled. | - |
129
- | <b>onPointRightClick</b>(<i>fn</i>) | Callback function for point right-clicks. The point object and the event object are included as arguments: `onPointRightClick(point, event)`. Only works if `pointsMerge` is disabled. | - |
128
+ | <b>onPointClick</b>(<i>fn</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. | - |
129
+ | <b>onPointRightClick</b>(<i>fn</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. | - |
130
130
  | <b>onPointHover</b>(<i>fn</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. | - |
131
131
 
132
132
  ### Arcs Layer
@@ -154,8 +154,8 @@ Globe({ configOptions })(<domElement>)
154
154
  | <b>arcDashInitialGap</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | 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. | 0 |
155
155
  | <b>arcDashAnimateTime</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | 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. | 0 |
156
156
  | <b>arcsTransitionDuration</b>([<i>num</i>]) | Getter/setter for 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. | 1000 |
157
- | <b>onArcClick</b>(<i>fn</i>) | Callback function for arc (left-button) clicks. The arc object and the event object are included as arguments: `onArcClick(arc, event)`. | - |
158
- | <b>onArcRightClick</b>(<i>fn</i>) | Callback function for arc right-clicks. The arc object and the event object are included as arguments: `onArcRightClick(arc, event)`. | - |
157
+ | <b>onArcClick</b>(<i>fn</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 })`. | - |
158
+ | <b>onArcRightClick</b>(<i>fn</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 })`. | - |
159
159
  | <b>onArcHover</b>(<i>fn</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)`. | - |
160
160
 
161
161
  ### Polygons Layer
@@ -177,8 +177,8 @@ Globe({ configOptions })(<domElement>)
177
177
  | <b>polygonAltitude</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | 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). | 0.01 |
178
178
  | <b>polygonCapCurvatureResolution</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | 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. | 5 |
179
179
  | <b>polygonsTransitionDuration</b>([<i>num</i>]) | Getter/setter for 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. | 1000 |
180
- | <b>onPolygonClick</b>(<i>fn</i>) | Callback function for polygon (left-button) clicks. The polygon object and the event object are included as arguments: `onPolygonClick(polygon, event)`. | - |
181
- | <b>onPolygonRightClick</b>(<i>fn</i>) | Callback function for polygon right-clicks. The polygon object and the event object are included as arguments: `onPolygonRightClick(polygon, event)`. | - |
180
+ | <b>onPolygonClick</b>(<i>fn</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 })`. | - |
181
+ | <b>onPolygonRightClick</b>(<i>fn</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 })`. | - |
182
182
  | <b>onPolygonHover</b>(<i>fn</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)`. | - |
183
183
 
184
184
  ### Paths Layer
@@ -203,8 +203,8 @@ Globe({ configOptions })(<domElement>)
203
203
  | <b>pathDashInitialGap</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | 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. | 0 |
204
204
  | <b>pathDashAnimateTime</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | 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. | 0 |
205
205
  | <b>pathTransitionDuration</b>([<i>num</i>]) | Getter/setter for 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. | 1000 |
206
- | <b>onPathClick</b>(<i>fn</i>) | Callback function for path (left-button) clicks. The path object and the event object are included as arguments: `onPathClick(arc, event)`. | - |
207
- | <b>onPathRightClick</b>(<i>fn</i>) | Callback function for path right-clicks. The path object and the event object are included as arguments: `onPathRightClick(arc, event)`. | - |
206
+ | <b>onPathClick</b>(<i>fn</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 })`. | - |
207
+ | <b>onPathRightClick</b>(<i>fn</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 })`. | - |
208
208
  | <b>onPathHover</b>(<i>fn</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)`. | - |
209
209
 
210
210
  ### Hex Bin Layer
@@ -228,8 +228,8 @@ Globe({ configOptions })(<domElement>)
228
228
  | <b>hexSideColor</b>([<i>fn</i>]) | 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. | `() => '#ffffaa'` |
229
229
  | <b>hexBinMerge</b>([<i>boolean</i>]) | Getter/setter for 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. | `false` |
230
230
  | <b>hexTransitionDuration</b>([<i>num</i>]) | Getter/setter for 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. | 1000 |
231
- | <b>onHexClick</b>(<i>fn</i>) | Callback function for hexagon (left-button) clicks. The hex object including all points binned and the event object are included as arguments: `onHexClick({ points, sumWeight, center: { lat, lng } }, event)`. Only works if `hexBinMerge` is disabled. | - |
232
- | <b>onHexRightClick</b>(<i>fn</i>) | Callback function for hexagon right-clicks. The hex object including all points binned and the event object are included as arguments: `onHexRightClick({ points, sumWeight, center: { lat, lng } }, event)`. Only works if `hexBinMerge` is disabled. | - |
231
+ | <b>onHexClick</b>(<i>fn</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. | - |
232
+ | <b>onHexRightClick</b>(<i>fn</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. | - |
233
233
  | <b>onHexHover</b>(<i>fn</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. | - |
234
234
 
235
235
  ### Hexed Polygons Layer
@@ -249,8 +249,8 @@ Globe({ configOptions })(<domElement>)
249
249
  | <b>hexPolygonMargin</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | 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. | 0.2 |
250
250
  | <b>hexPolygonCurvatureResolution</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | 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. | 5 |
251
251
  | <b>hexPolygonsTransitionDuration</b>([<i>num</i>]) | Getter/setter for 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. | 0 |
252
- | <b>onHexPolygonClick</b>(<i>fn</i>) | Callback function for hexed polygon (left-button) clicks. The polygon object and the event object are included as arguments: `onHexPolygonClick(polygon, event)`. | - |
253
- | <b>onHexPolygonRightClick</b>(<i>fn</i>) | Callback function for hexed polygon right-clicks. The polygon object and the event object are included as arguments: `onHexPolygonRightClick(polygon, event)`. | - |
252
+ | <b>onHexPolygonClick</b>(<i>fn</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 })`. | - |
253
+ | <b>onHexPolygonRightClick</b>(<i>fn</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 })`. | - |
254
254
  | <b>onHexPolygonHover</b>(<i>fn</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)`. | - |
255
255
 
256
256
  ### Tiles Layer
@@ -272,8 +272,8 @@ Globe({ configOptions })(<domElement>)
272
272
  | <b>tileMaterial</b>([<i>material</i>, <i>str</i> or <i>fn</i>]) | 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. | `() => new MeshLambertMaterial({ color: '#ffbb88' })` |
273
273
  | <b>tileCurvatureResolution</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | 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. | 5 |
274
274
  | <b>tilesTransitionDuration</b>([<i>num</i>]) | Getter/setter for 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. | 1000 |
275
- | <b>onTileClick</b>(<i>fn</i>) | Callback function for tile (left-button) clicks. The tile object and the event object are included as arguments: `onTileClick(tile, event)`. | - |
276
- | <b>onTileRightClick</b>(<i>fn</i>) | Callback function for tile right-clicks. The tile object and the event object are included as arguments: `onTileRightClick(tile, event)`. | - |
275
+ | <b>onTileClick</b>(<i>fn</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 })`. | - |
276
+ | <b>onTileRightClick</b>(<i>fn</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 })`. | - |
277
277
  | <b>onTileHover</b>(<i>fn</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)`. | - |
278
278
 
279
279
  ### Rings Layer
@@ -317,8 +317,8 @@ Globe({ configOptions })(<domElement>)
317
317
  | <b>labelDotRadius</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Label object accessor function, attribute or a numeric constant for the radius of the dot marker, in angular degrees. | 0.1 |
318
318
  | <b>labelDotOrientation</b>([<i>str</i> or <i>fn</i>]) | 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`. | `() => 'bottom'` |
319
319
  | <b>labelsTransitionDuration</b>([<i>num</i>]) | Getter/setter for 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. | 1000 |
320
- | <b>onLabelClick</b>(<i>fn</i>) | Callback function for label (left-button) clicks. The label object and the event object are included as arguments: `onLabelClick(label, event)`. | - |
321
- | <b>onLabelRightClick</b>(<i>fn</i>) | Callback function for label right-clicks. The label object and the event object are included as arguments: `onLabelRightClick(label, event)`. | - |
320
+ | <b>onLabelClick</b>(<i>fn</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 })`. | - |
321
+ | <b>onLabelRightClick</b>(<i>fn</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 })`. | - |
322
322
  | <b>onLabelHover</b>(<i>fn</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)`. | - |
323
323
 
324
324
  ### Custom Layer
@@ -333,8 +333,8 @@ Globe({ configOptions })(<domElement>)
333
333
  | <b>customLayerLabel</b>([<i>str</i> or <i>fn</i>]) | Object accessor function or attribute for label (shown as tooltip). Supports plain text or HTML content. | `name` |
334
334
  | <b>customThreeObject</b>([<i>Object3d</i>, <i>str</i> or <i>fn</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) => { ... })`. | `null` |
335
335
  | <b>customThreeObjectUpdate</b>([<i>str</i> or <i>fn</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) => { ... })`. | `null` |
336
- | <b>onCustomLayerClick</b>(<i>fn</i>) | Callback function for custom object (left-button) clicks. The custom object and the event object are included as arguments: `onCustomLayerClick(obj, event)`. | - |
337
- | <b>onCustomLayerRightClick</b>(<i>fn</i>) | Callback function for custom object right-clicks. The custom object and the event object are included as arguments: `onCustomLayerRightClick(obj, event)`. | - |
336
+ | <b>onCustomLayerClick</b>(<i>fn</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 })`. | - |
337
+ | <b>onCustomLayerRightClick</b>(<i>fn</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 })`. | - |
338
338
  | <b>onCustomLayerHover</b>(<i>fn</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)`. | - |
339
339
 
340
340
  ### Render control
@@ -52,14 +52,9 @@ function ownKeys(object, enumerableOnly) {
52
52
 
53
53
  if (Object.getOwnPropertySymbols) {
54
54
  var symbols = Object.getOwnPropertySymbols(object);
55
-
56
- if (enumerableOnly) {
57
- symbols = symbols.filter(function (sym) {
58
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
59
- });
60
- }
61
-
62
- keys.push.apply(keys, symbols);
55
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
56
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
57
+ })), keys.push.apply(keys, symbols);
63
58
  }
64
59
 
65
60
  return keys;
@@ -67,19 +62,12 @@ function ownKeys(object, enumerableOnly) {
67
62
 
68
63
  function _objectSpread2(target) {
69
64
  for (var i = 1; i < arguments.length; i++) {
70
- var source = arguments[i] != null ? arguments[i] : {};
71
-
72
- if (i % 2) {
73
- ownKeys(Object(source), true).forEach(function (key) {
74
- _defineProperty(target, key, source[key]);
75
- });
76
- } else if (Object.getOwnPropertyDescriptors) {
77
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
78
- } else {
79
- ownKeys(Object(source)).forEach(function (key) {
80
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
81
- });
82
- }
65
+ var source = null != arguments[i] ? arguments[i] : {};
66
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
67
+ _defineProperty(target, key, source[key]);
68
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
69
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
70
+ });
83
71
  }
84
72
 
85
73
  return target;
@@ -684,10 +672,9 @@ var globe = Kapsule__default["default"]({
684
672
  var objType = globeObj.__globeObjType;
685
673
 
686
674
  if (globeObj && objFns.hasOwnProperty(objType) && objFns[objType]) {
687
- var args = [ev];
675
+ var args = [ev]; // include click coords
688
676
 
689
677
  if (objType === 'globe') {
690
- // include click coords in { lat, lng }
691
678
  var _this$toGeoCoords = _this.toGeoCoords(point),
692
679
  lat = _this$toGeoCoords.lat,
693
680
  lng = _this$toGeoCoords.lng;
@@ -696,6 +683,8 @@ var globe = Kapsule__default["default"]({
696
683
  lat: lat,
697
684
  lng: lng
698
685
  });
686
+ } else {
687
+ args.push(_this.toGeoCoords(point));
699
688
  }
700
689
 
701
690
  dataAccessors.hasOwnProperty(objType) && args.unshift(dataAccessors[objType](globeObj.__data));
@@ -721,10 +710,9 @@ var globe = Kapsule__default["default"]({
721
710
  var objType = globeObj.__globeObjType;
722
711
 
723
712
  if (globeObj && objFns.hasOwnProperty(objType) && objFns[objType]) {
724
- var args = [ev];
713
+ var args = [ev]; // include click coords
725
714
 
726
715
  if (objType === 'globe') {
727
- // include click coords in { lat, lng }
728
716
  var _this$toGeoCoords2 = _this.toGeoCoords(point),
729
717
  lat = _this$toGeoCoords2.lat,
730
718
  lng = _this$toGeoCoords2.lng;
@@ -733,6 +721,8 @@ var globe = Kapsule__default["default"]({
733
721
  lat: lat,
734
722
  lng: lng
735
723
  });
724
+ } else {
725
+ args.push(_this.toGeoCoords(point));
736
726
  }
737
727
 
738
728
  dataAccessors.hasOwnProperty(objType) && args.unshift(dataAccessors[objType](globeObj.__data));
@@ -59,32 +59,32 @@ interface GlobeGenericInstance<ChainableInstance> extends ThreeGlobeGeneric<Chai
59
59
  // Interaction events
60
60
  onGlobeClick(callback: (coords: { lat, lng }, event: MouseEvent) => void): ChainableInstance;
61
61
  onGlobeRightClick(callback: (coords: { lat, lng }, event: MouseEvent) => void): ChainableInstance;
62
- onPointClick(callback: (point: object, event: MouseEvent) => void): ChainableInstance;
63
- onPointRightClick(callback: (point: object, event: MouseEvent) => void): ChainableInstance;
62
+ onPointClick(callback: (point: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
63
+ onPointRightClick(callback: (point: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
64
64
  onPointHover(callback: (point: object | null, prevPoint: object | null) => void): ChainableInstance;
65
- onArcClick(callback: (arc: object, event: MouseEvent) => void): ChainableInstance;
66
- onArcRightClick(callback: (arc: object, event: MouseEvent) => void): ChainableInstance;
65
+ onArcClick(callback: (arc: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
66
+ onArcRightClick(callback: (arc: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
67
67
  onArcHover(callback: (arc: object | null, prevArc: object | null) => void): ChainableInstance;
68
- onPolygonClick(callback: (polygon: object, event: MouseEvent) => void): ChainableInstance;
69
- onPolygonRightClick(callback: (polygon: object, event: MouseEvent) => void): ChainableInstance;
68
+ onPolygonClick(callback: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
69
+ onPolygonRightClick(callback: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
70
70
  onPolygonHover(callback: (polygon: object | null, prevPolygon: object | null) => void): ChainableInstance;
71
- onPathClick(callback: (path: object, event: MouseEvent) => void): ChainableInstance;
72
- onPathRightClick(callback: (path: object, event: MouseEvent) => void): ChainableInstance;
71
+ onPathClick(callback: (path: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
72
+ onPathRightClick(callback: (path: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
73
73
  onPathHover(callback: (path: object | null, prevPath: object | null) => void): ChainableInstance;
74
- onHexClick(callback: (hex: HexBin, event: MouseEvent) => void): ChainableInstance;
75
- onHexRightClick(callback: (hex: HexBin, event: MouseEvent) => void): ChainableInstance;
74
+ onHexClick(callback: (hex: HexBin, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
75
+ onHexRightClick(callback: (hex: HexBin, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
76
76
  onHexHover(callback: (hex: HexBin | null, prevHex: HexBin | null) => void): ChainableInstance;
77
- onHexPolygonClick(callback: (polygon: object, event: MouseEvent) => void): ChainableInstance;
78
- onHexPolygonRightClick(callback: (polygon: object, event: MouseEvent) => void): ChainableInstance;
77
+ onHexPolygonClick(callback: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
78
+ onHexPolygonRightClick(callback: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
79
79
  onHexPolygonHover(callback: (polygon: object | null, prevPolygon: object | null) => void): ChainableInstance;
80
- onTileClick(callback: (tile: object, event: MouseEvent) => void): ChainableInstance;
81
- onTileRightClick(callback: (tile: object, event: MouseEvent) => void): ChainableInstance;
80
+ onTileClick(callback: (tile: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
81
+ onTileRightClick(callback: (tile: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
82
82
  onTileHover(callback: (tile: object | null, prevTile: object | null) => void): ChainableInstance;
83
- onLabelClick(callback: (label: object, event: MouseEvent) => void): ChainableInstance;
84
- onLabelRightClick(callback: (label: object, event: MouseEvent) => void): ChainableInstance;
83
+ onLabelClick(callback: (label: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
84
+ onLabelRightClick(callback: (label: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
85
85
  onLabelHover(callback: (label: object | null, prevLabel: object | null) => void): ChainableInstance;
86
- onCustomLayerClick(callback: (obj: object, event: MouseEvent) => void): ChainableInstance;
87
- onCustomLayerRightClick(callback: (obj: object, event: MouseEvent) => void): ChainableInstance;
86
+ onCustomLayerClick(callback: (obj: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
87
+ onCustomLayerRightClick(callback: (obj: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
88
88
  onCustomLayerHover(callback: (obj: object | null, prevObj: object | null) => void): ChainableInstance;
89
89
 
90
90
  // Render control