@google/earthengine 0.1.411 → 0.1.413

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/earthengine",
3
- "version": "0.1.411",
3
+ "version": "0.1.413",
4
4
  "description": "JavaScript client for Google Earth Engine API.",
5
5
  "author": "Google LLC",
6
6
  "license": "Apache-2.0",
package/src/apiclient.js CHANGED
@@ -24,7 +24,7 @@ const {trustedResourceUrl} = goog.require('safevalues');
24
24
  /** @namespace */
25
25
  const apiclient = {};
26
26
 
27
- const API_CLIENT_VERSION = '0.1.411';
27
+ const API_CLIENT_VERSION = '0.1.413';
28
28
 
29
29
  exports.VERSION = apiVersion.VERSION;
30
30
  exports.API_CLIENT_VERSION = API_CLIENT_VERSION;
@@ -189,4 +189,4 @@ function configLayout(deviceInfo) {
189
189
  }
190
190
  }
191
191
 
192
- ui.root.onResize(configLayout);
192
+ ui.root.onResize(ui.util.debounce(configLayout, 100));
@@ -19,10 +19,8 @@ const EarthEngineTileSource = class extends AbstractTileSource {
19
19
  * tiles.
20
20
  * @param {?data.Profiler=} opt_profiler The profiler to send map tile
21
21
  * calculation cost to, if any.
22
- * @param {number=} opt_parallelism The number of map tiles to fetch
23
- * concurrently.
24
22
  */
25
- constructor(mapId, opt_profiler, opt_parallelism) {
23
+ constructor(mapId, opt_profiler) {
26
24
  super();
27
25
 
28
26
  /** @const @private {!data.RawMapId} The EE map ID for fetching tiles. */
@@ -35,9 +33,6 @@ const EarthEngineTileSource = class extends AbstractTileSource {
35
33
  * @const
36
34
  */
37
35
  this.profiler_ = opt_profiler || null;
38
-
39
- this.token_count_ =
40
- opt_parallelism || EarthEngineTileSource.DEFAULT_TOKEN_COUNT_;
41
36
  }
42
37
 
43
38
  /** @override */
@@ -82,6 +77,26 @@ const EarthEngineTileSource = class extends AbstractTileSource {
82
77
  return this.mapId_.mapid + '-' + this.mapId_.token;
83
78
  }
84
79
 
80
+ /**
81
+ * Sets the global parallelism for EE tiles.
82
+ *
83
+ * Note that most browsers will also throttle concurrent requests to the same
84
+ * domain, and that each Earth Engine user/project has its own concurrent
85
+ * request quota. This means that the actual parallelism will be the minimum
86
+ * of {this value, the browser's limit, the user and project's quota across
87
+ * clients}.
88
+ *
89
+ * Also note that increasing parallelism doesn't change the latency of
90
+ * individual requests, it just allows more requests to be in flight at once.
91
+ * Said another way, the amount of time per request won't change, but setting
92
+ * a higher parallelism can potentially yield greater overall throughput.
93
+ *
94
+ * @param {number} parallelism The new parallelism limit.
95
+ */
96
+ setGlobalParallelism(parallelism) {
97
+ this.getGlobalTokenPool_().setMaximumCount(parallelism);
98
+ }
99
+
85
100
  /**
86
101
  * Handles a request pool token being available by starting the tile load.
87
102
  * @param {AbstractTile} tile The tile to load.
@@ -131,7 +146,7 @@ const EarthEngineTileSource = class extends AbstractTileSource {
131
146
  getGlobalTokenPool_() {
132
147
  if (!EarthEngineTileSource.TOKEN_POOL_) {
133
148
  EarthEngineTileSource.TOKEN_POOL_ =
134
- new PriorityPool(0, this.token_count_);
149
+ new PriorityPool(0, EarthEngineTileSource.DEFAULT_TOKEN_COUNT_);
135
150
  }
136
151
  return EarthEngineTileSource.TOKEN_POOL_;
137
152
  }
package/test/ee_test.js CHANGED
@@ -57,7 +57,7 @@ describe('ee', function() {
57
57
  });
58
58
 
59
59
  it('supports joins, generated functions', function(done) {
60
- const primary = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
60
+ const primary = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')
61
61
  .filterDate('2014-04-01', '2014-06-01')
62
62
  .filterBounds(ee.Geometry.Point(-122.09, 37.42));
63
63