forked from qiuxiang/react-native-amap3d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
examples.js
97 lines (92 loc) · 2.59 KB
/
examples.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import React, { Component } from 'react'
import {
Platform,
ScrollView,
StyleSheet,
Text,
TouchableHighlight,
TouchableNativeFeedback,
View,
} from 'react-native'
const styles = StyleSheet.create({
scrollView: {
...Platform.select({
android: {
backgroundColor: '#f5f5f5',
},
}),
},
container: {
paddingBottom: 15,
},
group: {
marginTop: 15,
},
item: {
padding: 15,
backgroundColor: '#fff',
},
separator: {
height: StyleSheet.hairlineWidth,
backgroundColor: '#eee',
},
itemText: {
fontSize: 16,
color: '#424242',
},
})
let Touchable = TouchableHighlight
if (Platform.OS === 'android') {
Touchable = TouchableNativeFeedback
}
export default class Examples extends Component {
static navigationOptions = {
title: 'Examples',
}
_renderItem(title, route) {
return (
<Touchable onPress={() => this.props.navigation.navigate(route)}>
<View style={styles.item}>
<Text style={styles.itemText}>{title}</Text>
</View>
</Touchable>
)
}
render() {
return (
<ScrollView style={styles.scrollView} contentContainerStyle={styles.container}>
<View style={styles.group}>
{this._renderItem('地图模式', 'MapTypes')}
<View style={styles.separator} />
{this._renderItem('基本图层', 'Layers')}
<View style={styles.separator} />
{this._renderItem('室内地图', 'Indoor')}
<View style={styles.separator} />
{this._renderItem('地图控件', 'Controls')}
<View style={styles.separator} />
{this._renderItem('手势交互', 'Gestures')}
<View style={styles.separator} />
{this._renderItem('动画移动', 'Animated')}
<View style={styles.separator} />
{this._renderItem('地图事件', 'Events')}
</View>
<View style={styles.group}>
{this._renderItem('添加标记', 'Marker')}
<View style={styles.separator} />
{this._renderItem('绘制折线', 'Polyline')}
<View style={styles.separator} />
{this._renderItem('绘制多边形', 'Polygon')}
<View style={styles.separator} />
{this._renderItem('绘制圆形', 'Circle')}
<View style={styles.separator} />
{this._renderItem('热力图', 'HeatMap')}
<View style={styles.separator} />
{this._renderItem('海量点', 'MultiPoint')}
</View>
<View style={styles.group}>
{this._renderItem('导航', 'Navigation')}
</View>
</ScrollView>
)
}
}