Skip to content

Commit b4e0f25

Browse files
committed
Merge branch 'dev-2.1' of https://github.com/iMobileforJavaScript/iTablet into dev-2.1
2 parents 67775d5 + 80d5a98 commit b4e0f25

10 files changed

Lines changed: 54 additions & 36 deletions

File tree

ios/iTablet.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,15 +1984,15 @@
19841984
/* Begin PBXShellScriptBuildPhase section */
19851985
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
19861986
isa = PBXShellScriptBuildPhase;
1987-
buildActionMask = 12;
1987+
buildActionMask = 8;
19881988
files = (
19891989
);
19901990
inputPaths = (
19911991
);
19921992
name = "Bundle React Native code and images";
19931993
outputPaths = (
19941994
);
1995-
runOnlyForDeploymentPostprocessing = 0;
1995+
runOnlyForDeploymentPostprocessing = 1;
19961996
shellPath = /bin/sh;
19971997
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
19981998
};

src/components/Dialog/InputDialog.js

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export default class InputDialog extends PureComponent {
2424
returnKeyType: string,
2525
confirmBtnTitle: string,
2626
cancelBtnTitle: string,
27-
// inputSelection: Object,
2827
}
2928

3029
static defaultProps = {
@@ -125,10 +124,6 @@ export default class InputDialog extends PureComponent {
125124
value: text,
126125
})
127126
}}
128-
// selection={this.props.inputSelection || {
129-
// start: this.state.value.length - 1,
130-
// end: this.state.value.length - 1,
131-
// }}
132127
keyboardAppearance={this.props.keyboardAppearance}
133128
returnKeyType={this.props.returnKeyType}
134129
/>
@@ -150,16 +145,14 @@ export default class InputDialog extends PureComponent {
150145
confirmBtnDisable={!this.state.isLegalName}
151146
>
152147
<KeyboardAvoidingView behavior="padding" enabled>
153-
<View style={styles.contentView}>
154-
{this.renderInput()}
155-
{!this.state.isLegalName && this.state.errorInfo && (
156-
<View style={styles.errorView}>
157-
<Text numberOfLines={2} style={styles.errorInfo}>
158-
{this.state.errorInfo}
159-
</Text>
160-
</View>
161-
)}
162-
</View>
148+
{this.renderInput()}
149+
{!this.state.isLegalName && this.state.errorInfo && (
150+
<View style={styles.errorView}>
151+
<Text numberOfLines={2} style={styles.errorInfo}>
152+
{this.state.errorInfo}
153+
</Text>
154+
</View>
155+
)}
163156
</KeyboardAvoidingView>
164157
</Dialog>
165158
)

src/components/Dialog/styles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ export default StyleSheet.create({
162162
flexDirection: 'column',
163163
},
164164
errorView: {
165+
marginTop: Platform.OS === 'ios' ? scaleSize(4) : 0,
165166
width: '100%',
166167
minHeight: scaleSize(60),
167168
flexDirection: 'row',

src/components/Loading/IndicatorLoading.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const styles = StyleSheet.create({
2727
},
2828
})
2929

30-
export default class Container extends PureComponent {
30+
export default class IndicatorLoading extends PureComponent {
3131
props: {
3232
style?: StyleSheet,
3333
titleStyle?: StyleSheet,

src/containers/workspace/components/FunctionToolbar/FunctionToolbar.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export default class FunctionToolbar extends React.Component {
6868
map: Object,
6969

7070
incrementRoad: () => {},
71+
setMapIndoorNavigation: () => {},
7172
}
7273

7374
static defaultProps = {
@@ -109,6 +110,10 @@ export default class FunctionToolbar extends React.Component {
109110
this.visible = visible
110111
}
111112

113+
isMapIndoorNavigation = () => {
114+
this.props.setMapIndoorNavigation(false)
115+
}
116+
112117
start = type => {
113118
const toolRef = this.props.getToolRef()
114119
let height
@@ -591,11 +596,17 @@ export default class FunctionToolbar extends React.Component {
591596
incrementRoad = () => {
592597
if (GLOBAL.NAVIGATIONMAPOPEN) {
593598
this.props.incrementRoad()
599+
} else {
600+
Toast.show('请先打开室内数据')
594601
}
595602
}
596603

597604
openTraffic = async () => {
598-
await SMap.openTrafficMap()
605+
if (!GLOBAL.NAVIGATIONMAPOPEN) {
606+
await SMap.openTrafficMap()
607+
} else {
608+
Toast.show('请使用在线导航功能')
609+
}
599610
}
600611

601612
mapStyle = () => {

src/containers/workspace/components/ToolBar/StartData.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ function getStart(type, params) {
354354
title: getLanguage(global.language).Map_Main_Menu.START_NEW_MAP,
355355
//constants.CREATE,
356356
size: 'large',
357-
action: () => isNeedToSave(openTemplate),
357+
action: () => isNeedToSave(create),
358358
image: require('../../../../assets/mapTools/icon_create_black.png'),
359359
},
360360
{
@@ -847,9 +847,11 @@ function create() {
847847
if (
848848
GLOBAL.Type === constants.MAP_EDIT ||
849849
GLOBAL.Type === constants.MAP_THEME ||
850-
GLOBAL.Type === constants.MAP_PLOTTING
850+
GLOBAL.Type === constants.MAP_PLOTTING ||
851+
GLOBAL.Type === constants.MAP_NAVIGATION
851852
) {
852853
(async function() {
854+
GLOBAL.FUNCTIONTOOLBAR.isMapIndoorNavigation()
853855
let userPath =
854856
_params.user.currentUser.userName &&
855857
_params.user.currentUser.userType !== UserType.PROBATION_USER

src/containers/workspace/pages/map3D/Map3D.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,14 @@ export default class Map3D extends React.Component {
7575
}
7676
this.name = params.name || ''
7777
this.type = params.type || 'MAP_3D'
78+
this.mapLoaded = false // 判断地图是否加载完成
7879
}
7980

8081
componentDidMount() {
82+
this.container.setLoading(
83+
true,
84+
getLanguage(this.props.language).Prompt.LOADING,
85+
)
8186
InteractionManager.runAfterInteractions(() => {
8287
if (Platform.OS === 'android') {
8388
this.props.setBackAction({
@@ -94,10 +99,6 @@ export default class Map3D extends React.Component {
9499
GLOBAL.SaveMapView && GLOBAL.SaveMapView.setTitle(SAVE_TITLE)
95100

96101
// 三维地图只允许单例
97-
this.container.setLoading(
98-
true,
99-
getLanguage(this.props.language).Prompt.LOADING,
100-
)
101102
// setTimeout(this._addScene, 2000)
102103
this._addScene()
103104
this.addAttributeListener()
@@ -188,6 +189,7 @@ export default class Map3D extends React.Component {
188189
setTimeout(() => {
189190
this.container.setLoading(false)
190191
Toast.show(getLanguage(this.props.language).Prompt.NO_SCENE)
192+
this.mapLoaded = true
191193
//'无场景显示')
192194
}, 1500)
193195
return
@@ -207,11 +209,13 @@ export default class Map3D extends React.Component {
207209
// Toast.show('无场景显示')
208210
}, 1500)
209211
this.props.refreshLayer3dList && this.props.refreshLayer3dList()
212+
this.mapLoaded = true
210213
})
211214
} catch (e) {
212215
setTimeout(() => {
213216
this.container.setLoading(false)
214217
// Toast.show('无场景显示')
218+
this.mapLoaded = true
215219
}, 1500)
216220
}
217221
await SScene.changeBaseLayer(1)
@@ -281,6 +285,7 @@ export default class Map3D extends React.Component {
281285
// NavigationService.goBack()
282286
// }
283287
// GLOBAL.sceneName = ''
288+
if (!this.mapLoaded) return
284289
try {
285290
this.container &&
286291
this.container.setLoading(

src/containers/workspace/pages/mapView/MapView.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}}

src/language/EN/Map_module.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
//地图类型
22
const Map_Module = {
3-
MAP_EDIT: 'Mapping',
4-
MAP_3D: 'Scenes',
3+
MAP_EDIT: 'Cartography',
4+
MAP_3D: 'Scene',
55
MAP_AR: 'Video Map',
66
MAP_NAVIGATION: 'Navigation',
77
MAP_THEME: 'Thematic Map',
8-
MAP_COLLECTION: 'Collection',
8+
MAP_COLLECTION: 'Surveying',
99
MAP_PLOTTING: 'Plotting',
1010
MAP_ANALYST: 'Data Analysis',
1111
}

src/language/EN/Profile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const Profile = {
1111
SETTINGS: 'Settings',
1212
COLOR_SCHEME: 'Color Scheme',
1313
TEMPLATE: 'Template',
14-
COLLECTION_TEMPLATE: 'Collection Template',
14+
COLLECTION_TEMPLATE: 'Surveying Template',
1515
PLOTTING_TEMPLATE: 'Plotting Template',
1616
NAVIGATION: 'Navigation',
1717
INCREMENT: 'Increment',

0 commit comments

Comments
 (0)