Переглянути джерело

remove the Cesium.when

tags/2.12.0
Caven Chen 3 роки тому
джерело
коміт
0200c840b1

+ 2
- 2
libs/s3m/S3MTiles/S3MTile.js Переглянути файл

@@ -385,7 +385,7 @@ S3MTile.prototype.requestContent = function() {
}

this.contentState = ContentState.LOADING
this.contentReadyPromise = new Promise()
this.contentReadyPromise = Promise
let contentFailedFunction = getContentFailedFunction(this)

promise
@@ -397,7 +397,7 @@ S3MTile.prototype.requestContent = function() {

contentReadyFunction(layer, that, arrayBuffer)
})
.otherwise(function(error) {
.catch(function(error) {
if (request.state === Cesium.RequestState.CANCELLED) {
that.contentState = ContentState.UNLOADED
return

+ 2
- 2
libs/s3m/S3MTiles/S3MTilesLayer.js Переглянути файл

@@ -54,7 +54,7 @@ function S3MTilesLayer(options) {
distance: Number.MAX_VALUE,
pixel: Number.MAX_VALUE
}
this._readyPromise = new Promise()
this._readyPromise = Promise

this.loadConfig(options.url)
}
@@ -205,7 +205,7 @@ S3MTilesLayer.prototype.loadConfig = function(url) {

that._readyPromise.resolve(that)
})
.otherwise(function(error) {
.catch(function(error) {
that._readyPromise.reject(error)
})
}

Завантаження…
Відмінити
Зберегти