globe.gl 2.22.7 → 2.24.1
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 +42 -20
- package/dist/globe.gl.common.js +23 -33
- package/dist/globe.gl.d.ts +18 -18
- package/dist/globe.gl.js +16643 -16920
- package/dist/globe.gl.js.map +1 -1
- package/dist/globe.gl.min.js +4 -4
- package/dist/globe.gl.module.js +16 -26
- package/example/clouds/clouds.png +0 -0
- package/example/clouds/index.html +42 -0
- package/example/clouds/preview.png +0 -0
- package/example/custom-globe-styling/preview.png +0 -0
- package/example/earth-shield/index.html +24 -0
- package/example/earth-shield/preview.png +0 -0
- package/example/emit-arcs-on-click/index.html +57 -0
- package/example/moon-landing-sites/preview.png +0 -0
- package/example/random-rings/index.html +34 -0
- package/example/random-rings/preview.png +0 -0
- package/example/solar-terminator/preview.png +0 -0
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -29,6 +29,9 @@ Check out the examples:
|
|
|
29
29
|
* [Map Labels](https://vasturiano.github.io/globe.gl/example/world-cities/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/world-cities/index.html))
|
|
30
30
|
* [Hexed Country Polygons](https://vasturiano.github.io/globe.gl/example/hexed-polygons/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/hexed-polygons/index.html))
|
|
31
31
|
* [Tiles](https://vasturiano.github.io/globe.gl/example/tiles/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/tiles/index.html))
|
|
32
|
+
* [Ripple Rings](https://vasturiano.github.io/globe.gl/example/random-rings/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/random-rings/index.html))
|
|
33
|
+
* [Emit Arcs on Click](https://vasturiano.github.io/globe.gl/example/emit-arcs-on-click/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/emit-arcs-on-click/index.html))
|
|
34
|
+
* [Clouds](https://vasturiano.github.io/globe.gl/example/clouds/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/clouds/index.html))
|
|
32
35
|
* [Solar Terminator](https://vasturiano.github.io/globe.gl/example/solar-terminator/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/solar-terminator/index.html))
|
|
33
36
|
* [Custom Globe Styling](https://vasturiano.github.io/globe.gl/example/custom-globe-styling/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/custom-globe-styling/index.html))
|
|
34
37
|
* [Custom Layer](https://vasturiano.github.io/globe.gl/example/custom-layer/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/custom-layer/index.html))
|
|
@@ -36,6 +39,7 @@ Check out the examples:
|
|
|
36
39
|
* [Recent Earthquakes](https://vasturiano.github.io/globe.gl/example/earthquakes/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/earthquakes/index.html))
|
|
37
40
|
* [World Volcanoes](https://vasturiano.github.io/globe.gl/example/volcanoes/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/volcanoes/index.html))
|
|
38
41
|
* [US outbound international airline routes](https://vasturiano.github.io/globe.gl/example/airline-routes/us-international-outbound.html) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/airline-routes/us-international-outbound.html))
|
|
42
|
+
* [Earth Shield](https://vasturiano.github.io/globe.gl/example/earth-shield/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/earth-shield/index.html))
|
|
39
43
|
* [Submarine Cables](https://vasturiano.github.io/globe.gl/example/submarine-cables/index.html) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/submarine-cables/index.html))
|
|
40
44
|
* [Moon Landing Sites](https://vasturiano.github.io/globe.gl/example/moon-landing-sites/index.html) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/moon-landing-sites/index.html))
|
|
41
45
|
|
|
@@ -122,8 +126,8 @@ Globe({ configOptions })(<domElement>)
|
|
|
122
126
|
| <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 |
|
|
123
127
|
| <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` |
|
|
124
128
|
| <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 |
|
|
125
|
-
| <b>onPointClick</b>(<i>fn</i>) | Callback function for point (left-button) clicks. The point object
|
|
126
|
-
| <b>onPointRightClick</b>(<i>fn</i>) | Callback function for point right-clicks. The point object
|
|
129
|
+
| <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. | - |
|
|
130
|
+
| <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. | - |
|
|
127
131
|
| <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. | - |
|
|
128
132
|
|
|
129
133
|
### Arcs Layer
|
|
@@ -140,7 +144,7 @@ Globe({ configOptions })(<domElement>)
|
|
|
140
144
|
| <b>arcStartLng</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Arc object accessor function, attribute or a numeric constant for the line's start longitude coordinate. | `startLng` |
|
|
141
145
|
| <b>arcEndLat</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Arc object accessor function, attribute or a numeric constant for the line's end latitude coordinate. | `endLat` |
|
|
142
146
|
| <b>arcEndLng</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Arc object accessor function, attribute or a numeric constant for the line's end longitude coordinate. | `endLng` |
|
|
143
|
-
| <b>arcColor</b>([<i>str</i>, <i>[str, ...]</i> or <i>fn</i>]) | Arc object accessor function or attribute for the line's color. Also supports color gradients by passing an array of colors. | `() => '#ffffaa'` |
|
|
147
|
+
| <b>arcColor</b>([<i>str</i>, <i>[str, ...]</i> or <i>fn</i>]) | Arc object accessor function or attribute for the line's color. Also supports color gradients by passing an array of colors, or a color interpolator function. | `() => '#ffffaa'` |
|
|
144
148
|
| <b>arcAltitude</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Arc object accessor function, attribute or a numeric constant for the arc's maximum altitude (ocurring at the half-way distance between the two points) in terms of globe radius units (`0` = 0 altitude (ground line), `1` = globe radius). If a value of `null` or `undefined` is used, the altitude is automatically set proportionally to the distance between the two points, according to the scale set in `arcAltitudeAutoScale`. | `null` |
|
|
145
149
|
| <b>arcAltitudeAutoScale</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Arc object accessor function, attribute or a numeric constant for the scale of the arc's automatic altitude, in terms of units of the great-arc distance between the two points. A value of `1` indicates the arc should be as high as its length on the ground. Only applicable if `arcAltitude` is not set. | 0.5 |
|
|
146
150
|
| <b>arcStroke</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Arc object accessor function, attribute or a numeric constant for the line's diameter, in angular degrees. A value of `null` or `undefined` will render a [ThreeJS Line](https://threejs.org/docs/#api/objects/Line) whose width is constant (`1px`) regardless of the camera distance. Otherwise, a [TubeGeometry](https://threejs.org/docs/#api/en/geometries/TubeGeometry) is used. | `null` |
|
|
@@ -151,8 +155,8 @@ Globe({ configOptions })(<domElement>)
|
|
|
151
155
|
| <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 |
|
|
152
156
|
| <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 |
|
|
153
157
|
| <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 |
|
|
154
|
-
| <b>onArcClick</b>(<i>fn</i>) | Callback function for arc (left-button) clicks. The arc object
|
|
155
|
-
| <b>onArcRightClick</b>(<i>fn</i>) | Callback function for arc right-clicks. The arc object
|
|
158
|
+
| <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 })`. | - |
|
|
159
|
+
| <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 })`. | - |
|
|
156
160
|
| <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)`. | - |
|
|
157
161
|
|
|
158
162
|
### Polygons Layer
|
|
@@ -174,8 +178,8 @@ Globe({ configOptions })(<domElement>)
|
|
|
174
178
|
| <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 |
|
|
175
179
|
| <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 |
|
|
176
180
|
| <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 |
|
|
177
|
-
| <b>onPolygonClick</b>(<i>fn</i>) | Callback function for polygon (left-button) clicks. The polygon object
|
|
178
|
-
| <b>onPolygonRightClick</b>(<i>fn</i>) | Callback function for polygon right-clicks. The polygon object
|
|
181
|
+
| <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 })`. | - |
|
|
182
|
+
| <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 })`. | - |
|
|
179
183
|
| <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)`. | - |
|
|
180
184
|
|
|
181
185
|
### Paths Layer
|
|
@@ -193,15 +197,15 @@ Globe({ configOptions })(<domElement>)
|
|
|
193
197
|
| <b>pathPointLng</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Path point object accessor function, attribute or a numeric constant for the longitude coordinate. | `arr => arr[1]` |
|
|
194
198
|
| <b>pathPointAlt</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Path point object accessor function, attribute or a numeric constant for the point altitude, in terms of globe radius units (`0` = 0 altitude (ground), `1` = globe radius). | 0.001 |
|
|
195
199
|
| <b>pathResolution</b>([<i>num</i>]) | Getter/setter for the path's angular resolution, in lat/lng degrees. If the ground distance (excluding altitude) between two adjacent path points is larger than this value, the line segment will be interpolated in order to approximate the curvature of the sphere surface. Lower values yield more perfectly curved lines, at the cost of performance. | 2 |
|
|
196
|
-
| <b>pathColor</b>([<i>str</i>, <i>[str, ...]</i> or <i>fn</i>]) | Path object accessor function or attribute for the line's color. Also supports color gradients by passing an array of colors. Transparent colors are not supported in Fat Lines with set width. | `() => '#ffffaa'` |
|
|
200
|
+
| <b>pathColor</b>([<i>str</i>, <i>[str, ...]</i> or <i>fn</i>]) | Path object accessor function or attribute for the line's color. Also supports color gradients by passing an array of colors, or a color interpolator function. Transparent colors are not supported in Fat Lines with set width. | `() => '#ffffaa'` |
|
|
197
201
|
| <b>pathStroke</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Path object accessor function, attribute or a numeric constant for the line's diameter, in angular degrees. A value of `null` or `undefined` will render a [ThreeJS Line](https://threejs.org/docs/#api/objects/Line) whose width is constant (`1px`) regardless of the camera distance. Otherwise, a [FatLine](https://github.com/vasturiano/three-fatline) is used. | `null` |
|
|
198
202
|
| <b>pathDashLength</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 dashed segments in the path line, in terms of relative length of the whole line (`1` = full line length). | 1 |
|
|
199
203
|
| <b>pathDashGap</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 gap between dash segments, in terms of relative line length. | 0 |
|
|
200
204
|
| <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 |
|
|
201
205
|
| <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 |
|
|
202
206
|
| <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 |
|
|
203
|
-
| <b>onPathClick</b>(<i>fn</i>) | Callback function for path (left-button) clicks. The path object
|
|
204
|
-
| <b>onPathRightClick</b>(<i>fn</i>) | Callback function for path right-clicks. The path object
|
|
207
|
+
| <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 })`. | - |
|
|
208
|
+
| <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 })`. | - |
|
|
205
209
|
| <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)`. | - |
|
|
206
210
|
|
|
207
211
|
### Hex Bin Layer
|
|
@@ -225,8 +229,8 @@ Globe({ configOptions })(<domElement>)
|
|
|
225
229
|
| <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'` |
|
|
226
230
|
| <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` |
|
|
227
231
|
| <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 |
|
|
228
|
-
| <b>onHexClick</b>(<i>fn</i>) | Callback function for hexagon (left-button) clicks. The hex object including all points binned
|
|
229
|
-
| <b>onHexRightClick</b>(<i>fn</i>) | Callback function for hexagon right-clicks. The hex object including all points binned
|
|
232
|
+
| <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. | - |
|
|
233
|
+
| <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. | - |
|
|
230
234
|
| <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. | - |
|
|
231
235
|
|
|
232
236
|
### Hexed Polygons Layer
|
|
@@ -246,8 +250,8 @@ Globe({ configOptions })(<domElement>)
|
|
|
246
250
|
| <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 |
|
|
247
251
|
| <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 |
|
|
248
252
|
| <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 |
|
|
249
|
-
| <b>onHexPolygonClick</b>(<i>fn</i>) | Callback function for hexed polygon (left-button) clicks. The polygon object
|
|
250
|
-
| <b>onHexPolygonRightClick</b>(<i>fn</i>) | Callback function for hexed polygon right-clicks. The polygon object
|
|
253
|
+
| <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 })`. | - |
|
|
254
|
+
| <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 })`. | - |
|
|
251
255
|
| <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)`. | - |
|
|
252
256
|
|
|
253
257
|
### Tiles Layer
|
|
@@ -269,10 +273,28 @@ Globe({ configOptions })(<domElement>)
|
|
|
269
273
|
| <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' })` |
|
|
270
274
|
| <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 |
|
|
271
275
|
| <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 |
|
|
272
|
-
| <b>onTileClick</b>(<i>fn</i>) | Callback function for tile (left-button) clicks. The tile object
|
|
273
|
-
| <b>onTileRightClick</b>(<i>fn</i>) | Callback function for tile right-clicks. The tile object
|
|
276
|
+
| <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 })`. | - |
|
|
277
|
+
| <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 })`. | - |
|
|
274
278
|
| <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)`. | - |
|
|
275
279
|
|
|
280
|
+
### Rings Layer
|
|
281
|
+
|
|
282
|
+
<p align="center">
|
|
283
|
+
<a href="//vasturiano.github.io/globe.gl/example/random-rings/"><img width="70%" src="https://vasturiano.github.io/globe.gl/example/random-rings/preview.png"></a>
|
|
284
|
+
</p>
|
|
285
|
+
|
|
286
|
+
| Method | Description | Default |
|
|
287
|
+
| --- | --- | :--: |
|
|
288
|
+
| <b>ringsData</b>([<i>array</i>]) | Getter/setter for the list of self-propagating ripple rings to represent in the rings map layer. Each data point is displayed as an animated set of concentric circles that propagate outwards from (or inwards to) a central point through the spherical surface. | `[]` |
|
|
289
|
+
| <b>ringLat</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Ring object accessor function, attribute or a numeric constant for each circle's center latitude coordinate. | `lat` |
|
|
290
|
+
| <b>ringLng</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Ring object accessor function, attribute or a numeric constant for each circle's center longitude coordinate. | `lng` |
|
|
291
|
+
| <b>ringAltitude</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Ring object accessor function, attribute or a numeric constant for the circle's altitude in terms of globe radius units. | 0.0015 |
|
|
292
|
+
| <b>ringColor</b>([<i>str</i>, <i>[str, ...]</i> or <i>fn</i>]) | Ring object accessor function or attribute for the stroke color of each ring. Also supports radial color gradients by passing an array of colors, or a color interpolator function. | `() => '#ffffaa'` |
|
|
293
|
+
| <b>ringResolution</b>([<i>num</i>]) | Getter/setter for the geometric resolution of each circle, expressed in how many slice segments to divide the circumference. Higher values yield smoother circles. | 64 |
|
|
294
|
+
| <b>ringMaxRadius</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Ring object accessor function, attribute or a numeric constant for the maximum outer radius of the circles, at which the rings stop propagating and are removed. Defined in angular degrees. | 2 |
|
|
295
|
+
| <b>ringPropagationSpeed</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Ring object accessor function, attribute or a numeric constant for the propagation velocity of the rings, defined in degrees/second. Setting a negative value will invert the direction and cause the rings to propagate inwards from the `maxRadius`. | 1 |
|
|
296
|
+
| <b>ringRepeatPeriod</b>([<i>num</i>, <i>str</i> or <i>fn</i>]) | Ring object accessor function, attribute or a numeric constant for the interval of time (in ms) to wait between consecutive auto-generated concentric circles. A value less or equal than `0` will disable the repetition and emit a single ring. | 700 |
|
|
297
|
+
|
|
276
298
|
### Labels Layer
|
|
277
299
|
|
|
278
300
|
<p align="center">
|
|
@@ -296,8 +318,8 @@ Globe({ configOptions })(<domElement>)
|
|
|
296
318
|
| <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 |
|
|
297
319
|
| <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'` |
|
|
298
320
|
| <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 |
|
|
299
|
-
| <b>onLabelClick</b>(<i>fn</i>) | Callback function for label (left-button) clicks. The label object
|
|
300
|
-
| <b>onLabelRightClick</b>(<i>fn</i>) | Callback function for label right-clicks. The label object
|
|
321
|
+
| <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 })`. | - |
|
|
322
|
+
| <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 })`. | - |
|
|
301
323
|
| <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)`. | - |
|
|
302
324
|
|
|
303
325
|
### Custom Layer
|
|
@@ -312,8 +334,8 @@ Globe({ configOptions })(<domElement>)
|
|
|
312
334
|
| <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` |
|
|
313
335
|
| <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` |
|
|
314
336
|
| <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` |
|
|
315
|
-
| <b>onCustomLayerClick</b>(<i>fn</i>) | Callback function for custom object (left-button) clicks. The custom object
|
|
316
|
-
| <b>onCustomLayerRightClick</b>(<i>fn</i>) | Callback function for custom object right-clicks. The custom object
|
|
337
|
+
| <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 })`. | - |
|
|
338
|
+
| <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 })`. | - |
|
|
317
339
|
| <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)`. | - |
|
|
318
340
|
|
|
319
341
|
### Render control
|
package/dist/globe.gl.common.js
CHANGED
|
@@ -52,14 +52,9 @@ function ownKeys(object, enumerableOnly) {
|
|
|
52
52
|
|
|
53
53
|
if (Object.getOwnPropertySymbols) {
|
|
54
54
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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]
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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;
|
|
@@ -209,15 +197,15 @@ var three = window.THREE ? window.THREE // Prefer consumption from global THREE,
|
|
|
209
197
|
};
|
|
210
198
|
// Expose config from ThreeGlobe
|
|
211
199
|
|
|
212
|
-
var bindGlobe = linkKapsule('globe', ThreeGlobe__default[
|
|
213
|
-
var linkedGlobeProps = Object.assign.apply(Object, _toConsumableArray(['globeImageUrl', 'bumpImageUrl', 'showGlobe', 'showGraticules', 'showAtmosphere', 'atmosphereColor', 'atmosphereAltitude', 'globeMaterial', 'onGlobeReady', 'pointsData', 'pointLat', 'pointLng', 'pointColor', 'pointAltitude', 'pointRadius', 'pointResolution', 'pointsMerge', 'pointsTransitionDuration', 'arcsData', 'arcStartLat', 'arcStartLng', 'arcEndLat', 'arcEndLng', 'arcColor', 'arcAltitude', 'arcAltitudeAutoScale', 'arcStroke', 'arcCurveResolution', 'arcCircularResolution', 'arcDashLength', 'arcDashGap', 'arcDashInitialGap', 'arcDashAnimateTime', 'arcsTransitionDuration', 'polygonsData', 'polygonGeoJsonGeometry', 'polygonCapColor', 'polygonCapMaterial', 'polygonSideColor', 'polygonSideMaterial', 'polygonStrokeColor', 'polygonAltitude', 'polygonCapCurvatureResolution', 'polygonsTransitionDuration', 'pathsData', 'pathPoints', 'pathPointLat', 'pathPointLng', 'pathPointAlt', 'pathResolution', 'pathColor', 'pathStroke', 'pathDashLength', 'pathDashGap', 'pathDashInitialGap', 'pathDashAnimateTime', 'pathTransitionDuration', 'hexBinPointsData', 'hexBinPointLat', 'hexBinPointLng', 'hexBinPointWeight', 'hexBinResolution', 'hexMargin', 'hexTopCurvatureResolution', 'hexTopColor', 'hexSideColor', 'hexAltitude', 'hexBinMerge', 'hexTransitionDuration', 'hexPolygonsData', 'hexPolygonGeoJsonGeometry', 'hexPolygonColor', 'hexPolygonAltitude', 'hexPolygonResolution', 'hexPolygonMargin', 'hexPolygonCurvatureResolution', 'hexPolygonsTransitionDuration', 'tilesData', 'tileLat', 'tileLng', 'tileAltitude', 'tileWidth', 'tileHeight', 'tileUseGlobeProjection', 'tileMaterial', 'tileCurvatureResolution', 'tilesTransitionDuration', 'labelsData', 'labelLat', 'labelLng', 'labelAltitude', 'labelRotation', 'labelText', 'labelSize', 'labelTypeFace', 'labelColor', 'labelResolution', 'labelIncludeDot', 'labelDotRadius', 'labelDotOrientation', 'labelsTransitionDuration', 'customLayerData', 'customThreeObject', 'customThreeObjectUpdate'].map(function (p) {
|
|
200
|
+
var bindGlobe = linkKapsule('globe', ThreeGlobe__default["default"]);
|
|
201
|
+
var linkedGlobeProps = Object.assign.apply(Object, _toConsumableArray(['globeImageUrl', 'bumpImageUrl', 'showGlobe', 'showGraticules', 'showAtmosphere', 'atmosphereColor', 'atmosphereAltitude', 'globeMaterial', 'onGlobeReady', 'pointsData', 'pointLat', 'pointLng', 'pointColor', 'pointAltitude', 'pointRadius', 'pointResolution', 'pointsMerge', 'pointsTransitionDuration', 'arcsData', 'arcStartLat', 'arcStartLng', 'arcEndLat', 'arcEndLng', 'arcColor', 'arcAltitude', 'arcAltitudeAutoScale', 'arcStroke', 'arcCurveResolution', 'arcCircularResolution', 'arcDashLength', 'arcDashGap', 'arcDashInitialGap', 'arcDashAnimateTime', 'arcsTransitionDuration', 'polygonsData', 'polygonGeoJsonGeometry', 'polygonCapColor', 'polygonCapMaterial', 'polygonSideColor', 'polygonSideMaterial', 'polygonStrokeColor', 'polygonAltitude', 'polygonCapCurvatureResolution', 'polygonsTransitionDuration', 'pathsData', 'pathPoints', 'pathPointLat', 'pathPointLng', 'pathPointAlt', 'pathResolution', 'pathColor', 'pathStroke', 'pathDashLength', 'pathDashGap', 'pathDashInitialGap', 'pathDashAnimateTime', 'pathTransitionDuration', 'hexBinPointsData', 'hexBinPointLat', 'hexBinPointLng', 'hexBinPointWeight', 'hexBinResolution', 'hexMargin', 'hexTopCurvatureResolution', 'hexTopColor', 'hexSideColor', 'hexAltitude', 'hexBinMerge', 'hexTransitionDuration', 'hexPolygonsData', 'hexPolygonGeoJsonGeometry', 'hexPolygonColor', 'hexPolygonAltitude', 'hexPolygonResolution', 'hexPolygonMargin', 'hexPolygonCurvatureResolution', 'hexPolygonsTransitionDuration', 'tilesData', 'tileLat', 'tileLng', 'tileAltitude', 'tileWidth', 'tileHeight', 'tileUseGlobeProjection', 'tileMaterial', 'tileCurvatureResolution', 'tilesTransitionDuration', 'ringsData', 'ringLat', 'ringLng', 'ringAltitude', 'ringColor', 'ringResolution', 'ringMaxRadius', 'ringPropagationSpeed', 'ringRepeatPeriod', 'labelsData', 'labelLat', 'labelLng', 'labelAltitude', 'labelRotation', 'labelText', 'labelSize', 'labelTypeFace', 'labelColor', 'labelResolution', 'labelIncludeDot', 'labelDotRadius', 'labelDotOrientation', 'labelsTransitionDuration', 'customLayerData', 'customThreeObject', 'customThreeObjectUpdate'].map(function (p) {
|
|
214
202
|
return _defineProperty({}, p, bindGlobe.linkProp(p));
|
|
215
203
|
})));
|
|
216
204
|
var linkedGlobeMethods = Object.assign.apply(Object, _toConsumableArray(['getCoords', 'toGeoCoords'].map(function (p) {
|
|
217
205
|
return _defineProperty({}, p, bindGlobe.linkMethod(p));
|
|
218
206
|
}))); // Expose config from renderObjs
|
|
219
207
|
|
|
220
|
-
var bindRenderObjs = linkKapsule('renderObjs', ThreeRenderObjects__default[
|
|
208
|
+
var bindRenderObjs = linkKapsule('renderObjs', ThreeRenderObjects__default["default"]);
|
|
221
209
|
var linkedRenderObjsProps = Object.assign.apply(Object, _toConsumableArray(['width', 'height', 'backgroundColor', 'backgroundImageUrl', 'enablePointerInteraction'].map(function (p) {
|
|
222
210
|
return _defineProperty({}, p, bindRenderObjs.linkProp(p));
|
|
223
211
|
})));
|
|
@@ -226,7 +214,7 @@ var linkedRenderObjsMethods = Object.assign.apply(Object, _toConsumableArray(['p
|
|
|
226
214
|
}))); //
|
|
227
215
|
|
|
228
216
|
var GLOBE_RADIUS = 100;
|
|
229
|
-
var globe = Kapsule__default[
|
|
217
|
+
var globe = Kapsule__default["default"]({
|
|
230
218
|
props: _objectSpread2(_objectSpread2({
|
|
231
219
|
onZoom: {
|
|
232
220
|
triggerUpdate: false
|
|
@@ -418,7 +406,7 @@ var globe = Kapsule__default['default']({
|
|
|
418
406
|
curGeoCoords.lng += 360;
|
|
419
407
|
}
|
|
420
408
|
|
|
421
|
-
new TWEEN__default[
|
|
409
|
+
new TWEEN__default["default"].Tween(curGeoCoords).to(finalGeoCoords, transitionDuration).easing(TWEEN__default["default"].Easing.Cubic.InOut).onUpdate(setCameraPos).start();
|
|
422
410
|
}
|
|
423
411
|
|
|
424
412
|
return this;
|
|
@@ -498,10 +486,10 @@ var globe = Kapsule__default['default']({
|
|
|
498
486
|
globeInitConfig = _objectWithoutProperties(_ref6, _excluded);
|
|
499
487
|
|
|
500
488
|
return {
|
|
501
|
-
globe: new ThreeGlobe__default[
|
|
489
|
+
globe: new ThreeGlobe__default["default"](_objectSpread2({
|
|
502
490
|
waitForGlobeReady: waitForGlobeReady
|
|
503
491
|
}, globeInitConfig)),
|
|
504
|
-
renderObjs: ThreeRenderObjects__default[
|
|
492
|
+
renderObjs: ThreeRenderObjects__default["default"]({
|
|
505
493
|
controlType: 'orbit',
|
|
506
494
|
rendererConfig: rendererConfig,
|
|
507
495
|
waitForLoadComplete: waitForGlobeReady
|
|
@@ -614,7 +602,7 @@ var globe = Kapsule__default['default']({
|
|
|
614
602
|
};
|
|
615
603
|
var globeObj = getGlobeObj(obj);
|
|
616
604
|
var objType = globeObj && globeObj.__globeObjType;
|
|
617
|
-
return globeObj && objType && objAccessors.hasOwnProperty(objType) && dataAccessors.hasOwnProperty(objType) ? accessorFn__default[
|
|
605
|
+
return globeObj && objType && objAccessors.hasOwnProperty(objType) && dataAccessors.hasOwnProperty(objType) ? accessorFn__default["default"](objAccessors[objType])(dataAccessors[objType](globeObj.__data)) || '' : '';
|
|
618
606
|
}).onHover(function (obj) {
|
|
619
607
|
// Update tooltip and trigger onHover events
|
|
620
608
|
var hoverObjFns = {
|
|
@@ -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));
|
package/dist/globe.gl.d.ts
CHANGED
|
@@ -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
|