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
3a8fcba0
Commit
3a8fcba0
authored
Jun 03, 2017
by
Qiu Xiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整界面
parent
84eb0a46
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
11 deletions
+20
-11
app.js
example/src/app.js
+0
-4
examples.js
example/src/examples.js
+19
-6
layers.js
example/src/layers.js
+1
-1
No files found.
example/src/app.js
View file @
3a8fcba0
import
{
StatusBar
}
from
'react-native'
import
{
StackNavigator
}
from
'react-navigation'
import
{
StackNavigator
}
from
'react-navigation'
import
Examples
from
'./examples'
import
Examples
from
'./examples'
import
MapTypes
from
'./map-types'
import
MapTypes
from
'./map-types'
...
@@ -8,9 +7,6 @@ import Controls from './controls'
...
@@ -8,9 +7,6 @@ import Controls from './controls'
import
Gestures
from
'./gestures'
import
Gestures
from
'./gestures'
import
Marker
from
'./marker'
import
Marker
from
'./marker'
StatusBar
.
setBackgroundColor
(
'#e0e0e0'
)
StatusBar
.
setBarStyle
(
'dark-content'
)
export
default
StackNavigator
({
export
default
StackNavigator
({
Examples
:
{
screen
:
Examples
},
Examples
:
{
screen
:
Examples
},
MapTypes
:
{
screen
:
MapTypes
},
MapTypes
:
{
screen
:
MapTypes
},
...
...
example/src/examples.js
View file @
3a8fcba0
...
@@ -5,28 +5,41 @@ import {
...
@@ -5,28 +5,41 @@ import {
ScrollView
,
ScrollView
,
StyleSheet
,
StyleSheet
,
TouchableHighlight
,
TouchableHighlight
,
TouchableNativeFeedback
,
Platform
,
StatusBar
,
}
from
'react-native'
}
from
'react-native'
let
Touchable
=
TouchableHighlight
if
(
Platform
.
OS
===
'android'
)
{
Touchable
=
TouchableNativeFeedback
}
export
default
class
Examples
extends
Component
{
export
default
class
Examples
extends
Component
{
static
navigationOptions
=
{
static
navigationOptions
=
{
title
:
'AMap3D Examples'
,
title
:
'AMap3D Examples'
,
}
}
_renderItem
(
title
,
route
)
{
_renderItem
(
title
,
route
)
{
return
<
Touchable
Highlight
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
route
)}
>
return
<
Touchable
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
route
)}
>
<
View
style
=
{
styles
.
item
}
>
<
View
style
=
{
styles
.
item
}
>
<
Text
style
=
{
styles
.
itemText
}
>
{
title
}
<
/Text
>
<
Text
style
=
{
styles
.
itemText
}
>
{
title
}
<
/Text
>
<
/View
>
<
/View
>
<
/Touchable
Highlight
>
<
/Touchable
>
}
}
render
()
{
render
()
{
return
<
ScrollView
contentContainerStyle
=
{
styles
.
scrollView
}
>
return
<
ScrollView
contentContainerStyle
=
{
styles
.
scrollView
}
>
<
StatusBar
barStyle
=
'dark-content'
backgroundColor
=
'#e0e0e0'
/>
<
View
style
=
{
styles
.
group
}
>
<
View
style
=
{
styles
.
group
}
>
{
this
.
_renderItem
(
'地图模式'
,
'MapTypes'
)}
{
this
.
_renderItem
(
'地图模式'
,
'MapTypes'
)}
<
View
style
=
{
styles
.
separator
}
/
>
{
this
.
_renderItem
(
'图层功能'
,
'Layers'
)}
{
this
.
_renderItem
(
'图层功能'
,
'Layers'
)}
<
View
style
=
{
styles
.
separator
}
/
>
{
this
.
_renderItem
(
'室内地图'
,
'Indoor'
)}
{
this
.
_renderItem
(
'室内地图'
,
'Indoor'
)}
<
View
style
=
{
styles
.
separator
}
/
>
{
this
.
_renderItem
(
'地图控件'
,
'Controls'
)}
{
this
.
_renderItem
(
'地图控件'
,
'Controls'
)}
<
View
style
=
{
styles
.
separator
}
/
>
{
this
.
_renderItem
(
'手势交互'
,
'Gestures'
)}
{
this
.
_renderItem
(
'手势交互'
,
'Gestures'
)}
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
group
}
>
<
View
style
=
{
styles
.
group
}
>
...
@@ -43,14 +56,14 @@ const styles = StyleSheet.create({
...
@@ -43,14 +56,14 @@ const styles = StyleSheet.create({
},
},
group
:
{
group
:
{
marginTop
:
15
,
marginTop
:
15
,
borderTopWidth
:
StyleSheet
.
hairlineWidth
,
borderTopColor
:
'#e0e0e0'
,
},
},
item
:
{
item
:
{
padding
:
15
,
padding
:
15
,
backgroundColor
:
'#fff'
,
backgroundColor
:
'#fff'
,
borderBottomWidth
:
StyleSheet
.
hairlineWidth
,
},
borderBottomColor
:
'#e0e0e0'
,
separator
:
{
height
:
StyleSheet
.
hairlineWidth
,
backgroundColor
:
'#e0e0e0'
,
},
},
itemText
:
{
itemText
:
{
fontSize
:
16
,
fontSize
:
16
,
...
...
example/src/layers.js
View file @
3a8fcba0
...
@@ -23,7 +23,7 @@ export default class Layers extends Component {
...
@@ -23,7 +23,7 @@ export default class Layers extends Component {
value
=
{
this
.
state
.
showsBuildings
}
/
>
value
=
{
this
.
state
.
showsBuildings
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
control
}
>
<
View
style
=
{
styles
.
control
}
>
<
Text
>
交通
<
/Text
>
<
Text
>
路况
<
/Text
>
<
Switch
<
Switch
onValueChange
=
{
showsTraffic
=>
this
.
setState
({
showsTraffic
})}
onValueChange
=
{
showsTraffic
=>
this
.
setState
({
showsTraffic
})}
value
=
{
this
.
state
.
showsTraffic
}
/
>
value
=
{
this
.
state
.
showsTraffic
}
/
>
...
...
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