Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
react-native-amap3d
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
放牛的园子
react-native-amap3d
Commits
d732554b
Commit
d732554b
authored
May 28, 2017
by
Qiu Xiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化示例界面
parent
51199952
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
controls.js
example/src/controls.js
+9
-2
gestures.js
example/src/gestures.js
+10
-2
No files found.
example/src/controls.js
View file @
d732554b
...
@@ -20,24 +20,28 @@ export default class Controls extends Component {
...
@@ -20,24 +20,28 @@ export default class Controls extends Component {
<
View
style
=
{
styles
.
control
}
>
<
View
style
=
{
styles
.
control
}
>
<
Text
>
指南针
<
/Text
>
<
Text
>
指南针
<
/Text
>
<
Switch
<
Switch
style
=
{
styles
.
switch
}
onValueChange
=
{
showsCompass
=>
this
.
setState
({
showsCompass
})}
onValueChange
=
{
showsCompass
=>
this
.
setState
({
showsCompass
})}
value
=
{
this
.
state
.
showsCompass
}
/
>
value
=
{
this
.
state
.
showsCompass
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
control
}
>
<
View
style
=
{
styles
.
control
}
>
<
Text
>
比例尺
<
/Text
>
<
Text
>
比例尺
<
/Text
>
<
Switch
<
Switch
style
=
{
styles
.
switch
}
onValueChange
=
{
showsScale
=>
this
.
setState
({
showsScale
})}
onValueChange
=
{
showsScale
=>
this
.
setState
({
showsScale
})}
value
=
{
this
.
state
.
showsScale
}
/
>
value
=
{
this
.
state
.
showsScale
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
control
}
>
<
View
style
=
{
styles
.
control
}
>
<
Text
>
定位
<
/Text
>
<
Text
>
定位
<
/Text
>
<
Switch
<
Switch
style
=
{
styles
.
switch
}
onValueChange
=
{
showsLocationButton
=>
this
.
setState
({
showsLocationButton
})}
onValueChange
=
{
showsLocationButton
=>
this
.
setState
({
showsLocationButton
})}
value
=
{
this
.
state
.
showsLocationButton
}
/
>
value
=
{
this
.
state
.
showsLocationButton
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
control
}
>
<
View
style
=
{
styles
.
control
}
>
<
Text
>
缩放
<
/Text
>
<
Text
>
缩放
<
/Text
>
<
Switch
<
Switch
style
=
{
styles
.
switch
}
onValueChange
=
{
showsZoomControls
=>
this
.
setState
({
showsZoomControls
})}
onValueChange
=
{
showsZoomControls
=>
this
.
setState
({
showsZoomControls
})}
value
=
{
this
.
state
.
showsZoomControls
}
/
>
value
=
{
this
.
state
.
showsZoomControls
}
/
>
<
/View
>
<
/View
>
...
@@ -58,7 +62,7 @@ const styles = StyleSheet.create({
...
@@ -58,7 +62,7 @@ const styles = StyleSheet.create({
flex
:
1
,
flex
:
1
,
},
},
controls
:
{
controls
:
{
height
:
54
,
height
:
72
,
backgroundColor
:
'#fff'
,
backgroundColor
:
'#fff'
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
justifyContent
:
'space-between'
,
...
@@ -67,7 +71,10 @@ const styles = StyleSheet.create({
...
@@ -67,7 +71,10 @@ const styles = StyleSheet.create({
paddingRight
:
20
,
paddingRight
:
20
,
},
},
control
:
{
control
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
},
switch
:
{
marginTop
:
5
,
},
},
})
})
example/src/gestures.js
View file @
d732554b
...
@@ -20,24 +20,28 @@ export default class Gestures extends Component {
...
@@ -20,24 +20,28 @@ export default class Gestures extends Component {
<
View
style
=
{
styles
.
control
}
>
<
View
style
=
{
styles
.
control
}
>
<
Text
>
旋转
<
/Text
>
<
Text
>
旋转
<
/Text
>
<
Switch
<
Switch
style
=
{
styles
.
switch
}
onValueChange
=
{
rotateEnabled
=>
this
.
setState
({
rotateEnabled
})}
onValueChange
=
{
rotateEnabled
=>
this
.
setState
({
rotateEnabled
})}
value
=
{
this
.
state
.
rotateEnabled
}
/
>
value
=
{
this
.
state
.
rotateEnabled
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
control
}
>
<
View
style
=
{
styles
.
control
}
>
<
Text
>
滑动
<
/Text
>
<
Text
>
滑动
<
/Text
>
<
Switch
<
Switch
style
=
{
styles
.
switch
}
onValueChange
=
{
scrollEnabled
=>
this
.
setState
({
scrollEnabled
})}
onValueChange
=
{
scrollEnabled
=>
this
.
setState
({
scrollEnabled
})}
value
=
{
this
.
state
.
scrollEnabled
}
/
>
value
=
{
this
.
state
.
scrollEnabled
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
control
}
>
<
View
style
=
{
styles
.
control
}
>
<
Text
>
缩放
<
/Text
>
<
Text
>
缩放
<
/Text
>
<
Switch
<
Switch
style
=
{
styles
.
switch
}
onValueChange
=
{
zoomEnabled
=>
this
.
setState
({
zoomEnabled
})}
onValueChange
=
{
zoomEnabled
=>
this
.
setState
({
zoomEnabled
})}
value
=
{
this
.
state
.
zoomEnabled
}
/
>
value
=
{
this
.
state
.
zoomEnabled
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
control
}
>
<
View
style
=
{
styles
.
control
}
>
<
Text
>
倾斜
<
/Text
>
<
Text
>
倾斜
<
/Text
>
<
Switch
<
Switch
style
=
{
styles
.
switch
}
onValueChange
=
{
tiltEnabled
=>
this
.
setState
({
tiltEnabled
})}
onValueChange
=
{
tiltEnabled
=>
this
.
setState
({
tiltEnabled
})}
value
=
{
this
.
state
.
tiltEnabled
}
/
>
value
=
{
this
.
state
.
tiltEnabled
}
/
>
<
/View
>
<
/View
>
...
@@ -57,7 +61,7 @@ const styles = StyleSheet.create({
...
@@ -57,7 +61,7 @@ const styles = StyleSheet.create({
flex
:
1
,
flex
:
1
,
},
},
controls
:
{
controls
:
{
height
:
54
,
height
:
72
,
backgroundColor
:
'#fff'
,
backgroundColor
:
'#fff'
,
flexDirection
:
'row'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
justifyContent
:
'space-between'
,
...
@@ -66,7 +70,11 @@ const styles = StyleSheet.create({
...
@@ -66,7 +70,11 @@ const styles = StyleSheet.create({
paddingRight
:
20
,
paddingRight
:
20
,
},
},
control
:
{
control
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
},
switch
:
{
marginTop
:
5
,
},
},
})
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment