File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,8 @@ export class WebMap extends Observable {
337
337
that . addLayers ( mapInfo ) ;
338
338
}
339
339
that . addGraticule ( mapInfo ) ;
340
+ } ) . catch ( function ( error ) {
341
+ that . errorCallback && that . errorCallback ( error , 'getMapFaild' , that . map ) ;
340
342
} ) ;
341
343
} else {
342
344
await that . addBaseMap ( mapInfo ) ;
@@ -700,6 +702,8 @@ export class WebMap extends Observable {
700
702
701
703
this . map . addLayer ( layer ) ;
702
704
} ) ;
705
+ } ) . catch ( function ( error ) {
706
+ throw error ;
703
707
} ) ;
704
708
}
705
709
/**
@@ -1667,6 +1671,10 @@ export class WebMap extends Observable {
1667
1671
that . addMVTMapLayer ( mapInfo , layer , layerIndex ) . then ( ( ) => {
1668
1672
that . layerAdded ++ ;
1669
1673
that . sendMapToUser ( len ) ;
1674
+ } ) . catch ( function ( error ) {
1675
+ that . layerAdded ++ ;
1676
+ that . sendMapToUser ( len ) ;
1677
+ that . errorCallback && that . errorCallback ( error , 'getLayerFaild' , that . map ) ;
1670
1678
} ) ;
1671
1679
} else if ( ( dataSource && dataSource . serverId ) || layer . layerType === "MARKER" || layer . layerType === 'HOSTED_TILE' || isSampleData ) {
1672
1680
//数据存储到iportal上了
@@ -4384,7 +4392,7 @@ export class WebMap extends Observable {
4384
4392
layerInfo . bounds = result . bounds ;
4385
4393
return layerInfo ;
4386
4394
} ) . catch ( error => {
4387
- return error ;
4395
+ throw error ;
4388
4396
} )
4389
4397
}
4390
4398
You can’t perform that action at this time.
0 commit comments