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
14cc31f6
Commit
14cc31f6
authored
Jul 13, 2017
by
Qiu Xiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
6f14f762
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
18 deletions
+7
-18
MapView.js
components/MapView.js
+7
-18
No files found.
components/MapView.js
View file @
14cc31f6
...
...
@@ -2,14 +2,11 @@ import React, {PropTypes, Component} from 'react'
import
{
View
,
UIManager
,
NativeModules
,
Platform
,
findNodeHandle
,
requireNativeComponent
,
}
from
'react-native'
import
{
LatLng
,
Region
}
from
'./PropTypes'
import
Marker
from
'./Marker'
import
Overlay
from
'./Overlay'
import
Polyline
from
'./Polyline'
import
Polygon
from
'./Polygon'
import
Circle
from
'./Circle'
...
...
@@ -171,23 +168,16 @@ class MapView extends Component {
* @param {{zoomLevel: ?number, coordinate: ?LatLng, titl: ?number}} target
* @param duration
*/
animateTo
(
target
,
duration
=
10
00
)
{
animateTo
(
target
,
duration
=
5
00
)
{
this
.
_sendCommand
(
'animateTo'
,
[
target
,
duration
])
}
_sendCommand
(
command
,
params
=
null
)
{
switch
(
Platform
.
OS
)
{
case
'android'
:
UIManager
.
dispatchViewManagerCommand
(
findNodeHandle
(
this
),
UIManager
.
AMapView
.
Commands
[
command
],
params
,
)
break
;
case
'ios'
:
NativeModules
.
AMapViewManager
[
command
](
findNodeHandle
(
this
),
params
)
break
;
}
UIManager
.
dispatchViewManagerCommand
(
findNodeHandle
(
this
),
UIManager
.
AMapView
.
Commands
[
command
],
params
,
)
}
render
()
{
...
...
@@ -195,7 +185,6 @@ class MapView extends Component {
}
static
Marker
=
Marker
static
Overlay
=
Overlay
static
Polyline
=
Polyline
static
Polygon
=
Polygon
static
Circle
=
Circle
...
...
@@ -204,4 +193,4 @@ class MapView extends Component {
AMapView
=
requireNativeComponent
(
'AMapView'
,
MapView
)
export
default
MapView
export
{
MapView
,
Marker
,
Overlay
,
Polyline
,
Polygon
,
Circle
}
export
{
MapView
,
Marker
,
Polyline
,
Polygon
,
Circle
}
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