Skip to content

Commit 81ad776

Browse files
committed
fix(components): 🐛 there is an error when loading SuperMap iServer map services.
1 parent 4fff786 commit 81ad776

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

packages/components/providers/supermap/SuperMapImageryProvider.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -277,20 +277,16 @@ function buildImageResource(this, x, y, level) {
277277
}
278278

279279
async function init(this) {
280-
console.log('ada')
281280
const { Resource } = Cesium
282281
if (this.isTileMap) {
283-
const promise = Resource.fetchJsonp({
284-
url: this._options.url + '.jsonp',
285-
queryParameters: {
286-
f: 'json'
287-
}
288-
})
289-
290282
try {
291-
promise.then(e => {
292-
onFulfilledTileMap.call(this, e)
283+
const res = await Resource.fetchJsonp({
284+
url: this._options.url + '.jsonp',
285+
queryParameters: {
286+
f: 'json'
287+
}
293288
})
289+
onFulfilledTileMap.call(this, res)
294290
} catch (e) {
295291
onRejected.call(this)
296292
}
@@ -300,7 +296,6 @@ async function init(this) {
300296
const e = await Resource.fetchText({
301297
url: this.url + 'config'
302298
})
303-
console.log('ada')
304299
onFulfilledRest3D.call(this, e)
305300
} catch (e) {
306301
onRejected.call(this)

0 commit comments

Comments
 (0)