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 {
337337 that . addLayers ( mapInfo ) ;
338338 }
339339 that . addGraticule ( mapInfo ) ;
340+ } ) . catch ( function ( error ) {
341+ that . errorCallback && that . errorCallback ( error , 'getMapFaild' , that . map ) ;
340342 } ) ;
341343 } else {
342344 await that . addBaseMap ( mapInfo ) ;
@@ -700,6 +702,8 @@ export class WebMap extends Observable {
700702
701703 this . map . addLayer ( layer ) ;
702704 } ) ;
705+ } ) . catch ( function ( error ) {
706+ throw error ;
703707 } ) ;
704708 }
705709 /**
@@ -1667,6 +1671,10 @@ export class WebMap extends Observable {
16671671 that . addMVTMapLayer ( mapInfo , layer , layerIndex ) . then ( ( ) => {
16681672 that . layerAdded ++ ;
16691673 that . sendMapToUser ( len ) ;
1674+ } ) . catch ( function ( error ) {
1675+ that . layerAdded ++ ;
1676+ that . sendMapToUser ( len ) ;
1677+ that . errorCallback && that . errorCallback ( error , 'getLayerFaild' , that . map ) ;
16701678 } ) ;
16711679 } else if ( ( dataSource && dataSource . serverId ) || layer . layerType === "MARKER" || layer . layerType === 'HOSTED_TILE' || isSampleData ) {
16721680 //数据存储到iportal上了
@@ -4384,7 +4392,7 @@ export class WebMap extends Observable {
43844392 layerInfo . bounds = result . bounds ;
43854393 return layerInfo ;
43864394 } ) . catch ( error => {
4387- return error ;
4395+ throw error ;
43884396 } )
43894397 }
43904398
You can’t perform that action at this time.
0 commit comments