@google/earthengine 0.1.401 → 0.1.403
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/build/browser.js +6855 -6912
- package/build/ee_api_js.js +685 -688
- package/build/ee_api_js_debug.js +6832 -6889
- package/build/ee_api_js_npm.js +6855 -6912
- package/build/main.js +6855 -6912
- package/package.json +1 -1
- package/src/apiclient.js +1 -1
- package/src/geometry.js +11 -17
- package/src/layers/abstractoverlay.js +10 -2
package/package.json
CHANGED
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.
|
|
27
|
+
const API_CLIENT_VERSION = '0.1.403';
|
|
28
28
|
|
|
29
29
|
exports.VERSION = apiVersion.VERSION;
|
|
30
30
|
exports.API_CLIENT_VERSION = API_CLIENT_VERSION;
|
package/src/geometry.js
CHANGED
|
@@ -67,8 +67,8 @@ ee.Geometry = function(geoJson, opt_proj, opt_geodesic, opt_evenOdd) {
|
|
|
67
67
|
// argument, we know the arguments were passed in sequence. If not, we
|
|
68
68
|
// assume the user intended to pass a named argument dictionary and use
|
|
69
69
|
// ee.arguments.extractFromFunction() to validate and extract the keys.
|
|
70
|
-
if (!('type' in geoJson)) {
|
|
71
|
-
|
|
70
|
+
if (typeof geoJson !== 'object' || !('type' in geoJson)) {
|
|
71
|
+
const args = ee.arguments.extractFromFunction(ee.Geometry, arguments);
|
|
72
72
|
geoJson = args['geoJson'];
|
|
73
73
|
opt_proj = args['proj'];
|
|
74
74
|
opt_geodesic = args['geodesic'];
|
|
@@ -77,9 +77,9 @@ ee.Geometry = function(geoJson, opt_proj, opt_geodesic, opt_evenOdd) {
|
|
|
77
77
|
|
|
78
78
|
ee.Geometry.initialize();
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
const computed = geoJson instanceof ee.ComputedObject &&
|
|
81
81
|
!(geoJson instanceof ee.Geometry && geoJson.type_);
|
|
82
|
-
|
|
82
|
+
const options =
|
|
83
83
|
(opt_proj != null || opt_geodesic != null || opt_evenOdd != null);
|
|
84
84
|
if (computed) {
|
|
85
85
|
if (options) {
|
|
@@ -94,7 +94,7 @@ ee.Geometry = function(geoJson, opt_proj, opt_geodesic, opt_evenOdd) {
|
|
|
94
94
|
|
|
95
95
|
// Below here, we're working with a GeoJSON literal.
|
|
96
96
|
if (geoJson instanceof ee.Geometry) {
|
|
97
|
-
geoJson = /** @type {Object} */(geoJson.encode());
|
|
97
|
+
geoJson = /** @type {!Object} */(geoJson.encode());
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
if (!ee.Geometry.isValidGeometry_(geoJson)) {
|
|
@@ -105,16 +105,14 @@ ee.Geometry = function(geoJson, opt_proj, opt_geodesic, opt_evenOdd) {
|
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
107
|
* The type of the geometry.
|
|
108
|
-
* @
|
|
109
|
-
* @private
|
|
108
|
+
* @private @const {string}
|
|
110
109
|
*/
|
|
111
110
|
this.type_ = geoJson['type'];
|
|
112
111
|
|
|
113
112
|
/**
|
|
114
113
|
* The coordinates of the geometry, up to 4 nested levels with numbers at
|
|
115
114
|
* the last level. Null if and only if type is GeometryCollection.
|
|
116
|
-
* @
|
|
117
|
-
* @private
|
|
115
|
+
* @private @const {?Array}
|
|
118
116
|
*/
|
|
119
117
|
this.coordinates_ = (geoJson['coordinates'] != null) ?
|
|
120
118
|
goog.object.unsafeClone(geoJson['coordinates']) :
|
|
@@ -122,15 +120,13 @@ ee.Geometry = function(geoJson, opt_proj, opt_geodesic, opt_evenOdd) {
|
|
|
122
120
|
|
|
123
121
|
/**
|
|
124
122
|
* The subgeometries, non-null if and only if type is GeometryCollection.
|
|
125
|
-
* @
|
|
126
|
-
* @private
|
|
123
|
+
* @private @const {Array?}
|
|
127
124
|
*/
|
|
128
125
|
this.geometries_ = geoJson['geometries'] || null;
|
|
129
126
|
|
|
130
127
|
/**
|
|
131
128
|
* The projection of the geometry.
|
|
132
|
-
* @
|
|
133
|
-
* @private
|
|
129
|
+
* @private {string|undefined}
|
|
134
130
|
*/
|
|
135
131
|
this.proj_;
|
|
136
132
|
if (opt_proj != null) {
|
|
@@ -148,8 +144,7 @@ ee.Geometry = function(geoJson, opt_proj, opt_geodesic, opt_evenOdd) {
|
|
|
148
144
|
|
|
149
145
|
/**
|
|
150
146
|
* Whether the geometry has spherical geodesic edges.
|
|
151
|
-
* @
|
|
152
|
-
* @private
|
|
147
|
+
* @private {boolean|undefined}
|
|
153
148
|
*/
|
|
154
149
|
this.geodesic_ = opt_geodesic;
|
|
155
150
|
if (this.geodesic_ === undefined && 'geodesic' in geoJson) {
|
|
@@ -159,8 +154,7 @@ ee.Geometry = function(geoJson, opt_proj, opt_geodesic, opt_evenOdd) {
|
|
|
159
154
|
/**
|
|
160
155
|
* Whether polygon interiors are based on the even/odd rule. If false,
|
|
161
156
|
* the left-inside rule is used. If unspecified, defaults to true.
|
|
162
|
-
* @
|
|
163
|
-
* @private
|
|
157
|
+
* @private {boolean|undefined}
|
|
164
158
|
*/
|
|
165
159
|
this.evenOdd_ = opt_evenOdd;
|
|
166
160
|
if (this.evenOdd_ === undefined && 'evenOdd' in geoJson) {
|
|
@@ -148,7 +148,13 @@ ee.layers.AbstractOverlay = class extends goog.events.EventTarget {
|
|
|
148
148
|
return this.stats;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
/**
|
|
151
|
+
/**
|
|
152
|
+
* Implements getTile() for the google.maps.MapType interface.
|
|
153
|
+
* @param {?google.maps.Point} coord Position of tile.
|
|
154
|
+
* @param {number} zoom Zoom level.
|
|
155
|
+
* @param {?Document} ownerDocument Parent document.
|
|
156
|
+
* @return {?Element} Element to be displayed as a map tile.
|
|
157
|
+
*/
|
|
152
158
|
getTile(coord, zoom, ownerDocument) {
|
|
153
159
|
var maxCoord = 1 << zoom;
|
|
154
160
|
|
|
@@ -193,7 +199,9 @@ ee.layers.AbstractOverlay = class extends goog.events.EventTarget {
|
|
|
193
199
|
return tile.div;
|
|
194
200
|
}
|
|
195
201
|
|
|
196
|
-
/**
|
|
202
|
+
/**
|
|
203
|
+
* Implements releaseTile() for the google.maps.MapType interface.
|
|
204
|
+
*/
|
|
197
205
|
releaseTile(tileDiv) {
|
|
198
206
|
var tile = this.tilesById.get(tileDiv.id);
|
|
199
207
|
this.tilesById.remove(tileDiv.id);
|