kopia lustrzana https://github.com/robhawkes/vizicities
Add missing reject statements
rodzic
89ea1ee87d
commit
5be99841ff
|
@ -63,7 +63,7 @@ class GeoJSONWorkerLayer extends Layer {
|
|||
transferrables.push(geojson.buffer);
|
||||
this._execWorker(geojson, this._options.topojson, this._world._originPoint, style, this._options.interactive, transferrables).then(() => {
|
||||
resolve();
|
||||
});
|
||||
}).catch(reject);
|
||||
} else if (typeof this._options.onEachFeature === 'function') {
|
||||
GeoJSONWorkerLayer.RequestGeoJSON(geojson).then((res) => {
|
||||
var fc = GeoJSON.collectFeatures(res, this._options.topojson);
|
||||
|
@ -80,12 +80,12 @@ class GeoJSONWorkerLayer extends Layer {
|
|||
|
||||
this._execWorker(geojson, false, this._options.headers, this._world._originPoint, style, this._options.interactive, transferrables).then(() => {
|
||||
resolve();
|
||||
});
|
||||
}).catch(reject);
|
||||
});
|
||||
} else {
|
||||
this._execWorker(geojson, this._options.topojson, this._options.headers, this._world._originPoint, style, this._options.interactive, transferrables).then(() => {
|
||||
resolve();
|
||||
});
|
||||
}).catch(reject);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -291,9 +291,9 @@ class GeoJSONWorkerLayer extends Layer {
|
|||
});
|
||||
|
||||
var point;
|
||||
var projected = converted.map(_coordinates => {
|
||||
return _coordinates.map(ring => {
|
||||
return ring.map(latlon => {
|
||||
var projected = converted.map((_coordinates) => {
|
||||
return _coordinates.map((ring) => {
|
||||
return ring.map((latlon) => {
|
||||
point = Geo.latLonToPoint(latlon)._subtract(originPoint);
|
||||
|
||||
if (!pointScale) {
|
||||
|
|
|
@ -234,7 +234,7 @@ class PolygonLayer extends Layer {
|
|||
|
||||
// TODO: Ensure that this has feature parity with the non-static method
|
||||
static SetBufferAttributes(coordinates, options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
var height = 0;
|
||||
|
||||
// Convert height into world units
|
||||
|
|
|
@ -22,7 +22,7 @@ class WorkerPool {
|
|||
Promise.all(workerPromises).then(() => {
|
||||
if (DEBUG) { console.log('All workers ready', performance.now()); }
|
||||
resolve();
|
||||
});
|
||||
}).catch(reject);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ class WorkerPool {
|
|||
this.workers.push(worker);
|
||||
|
||||
resolve();
|
||||
});
|
||||
}).catch(reject);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue