@@ -228,12 +228,19 @@ export default class MapView extends React.Component {
228228 } ,
229229 ]
230230
231+ this . mapLoaded = false // 判断地图是否加载完成
231232 this . fullMap = false
232233 this . analystRecommendVisible = false // 底部分析推荐列表 是否显示
233234 GLOBAL . showAIDetect = GLOBAL . Type === constants . MAP_AR
234235 }
235236
236237 componentDidMount ( ) {
238+ this . container &&
239+ this . container . setLoading (
240+ true ,
241+ getLanguage ( this . props . language ) . Prompt . LOADING ,
242+ //'地图加载中'
243+ )
237244 InteractionManager . runAfterInteractions ( ( ) => {
238245 GLOBAL . SaveMapView &&
239246 GLOBAL . SaveMapView . setTitle (
@@ -242,12 +249,6 @@ export default class MapView extends React.Component {
242249 getLanguage ( this . props . language ) . Prompt . SAVE_NO ,
243250 getLanguage ( this . props . language ) . Prompt . CANCEL ,
244251 )
245- this . container &&
246- this . container . setLoading (
247- true ,
248- getLanguage ( this . props . language ) . Prompt . LOADING ,
249- //'地图加载中'
250- )
251252
252253 this . setState ( {
253254 showMap : true ,
@@ -986,6 +987,7 @@ export default class MapView extends React.Component {
986987 }
987988
988989 back = ( ) => {
990+ if ( ! this . mapLoaded ) return
989991 // this.props.setMapIndoorNavigation(false)
990992 this . props . setMap2Dto3D ( false )
991993 GLOBAL . NAVIGATIONMAPOPEN = false
@@ -1191,6 +1193,8 @@ export default class MapView extends React.Component {
11911193 } ,
11921194 )
11931195
1196+ this . mapLoaded = true
1197+
11941198 this . _addGeometrySelectedListener ( )
11951199 this . setLoading ( false )
11961200
@@ -1216,6 +1220,7 @@ export default class MapView extends React.Component {
12161220 SMap . setIsMagnifierEnabled ( true )
12171221 } catch ( e ) {
12181222 this . setLoading ( false )
1223+ this . mapLoaded = true
12191224 }
12201225 } . bind ( this ) ( ) )
12211226 }
@@ -1439,7 +1444,7 @@ export default class MapView extends React.Component {
14391444 return (
14401445 < FunctionToolbar
14411446 language = { this . props . language }
1442- ref = { ref => ( this . functionToolbar = ref ) }
1447+ ref = { ref => ( GLOBAL . FUNCTIONTOOLBAR = this . functionToolbar = ref ) }
14431448 style = { styles . functionToolbar }
14441449 type = { this . type }
14451450 getToolRef = { ( ) => this . toolBox }
@@ -1458,6 +1463,7 @@ export default class MapView extends React.Component {
14581463 this . showFullMap ( true )
14591464 this . setState ( { showIncrement : true } )
14601465 } }
1466+ setMapIndoorNavigation = { this . props . setMapIndoorNavigation }
14611467 save = { ( ) => {
14621468 //this.saveMapWithNoWorkspace()
14631469 } }
0 commit comments