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
37717782
Commit
37717782
authored
Jul 06, 2017
by
Qiu Xiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android#animated 添加 rotation 支持
parent
88c43dec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
AMapView.kt
android/src/main/java/cn/qiuxiang/react/amap3d/AMapView.kt
+7
-2
No files found.
android/src/main/java/cn/qiuxiang/react/amap3d/AMapView.kt
View file @
37717782
...
...
@@ -160,6 +160,7 @@ class AMapView(context: Context) : MapView(context) {
var
coordinate
=
currentCameraPosition
.
target
var
zoomLevel
=
currentCameraPosition
.
zoom
var
tilt
=
currentCameraPosition
.
tilt
var
rotation
=
currentCameraPosition
.
bearing
if
(
target
.
hasKey
(
"coordinate"
))
{
val
json
=
target
.
getMap
(
"coordinate"
)
...
...
@@ -174,8 +175,12 @@ class AMapView(context: Context) : MapView(context) {
tilt
=
target
.
getDouble
(
"tilt"
).
toFloat
()
}
val
cameraUpdate
=
CameraUpdateFactory
.
newCameraPosition
(
CameraPosition
(
coordinate
,
zoomLevel
,
tilt
,
currentCameraPosition
.
bearing
))
if
(
target
.
hasKey
(
"rotation"
))
{
rotation
=
target
.
getDouble
(
"rotation"
).
toFloat
()
}
val
cameraUpdate
=
CameraUpdateFactory
.
newCameraPosition
(
CameraPosition
(
coordinate
,
zoomLevel
,
tilt
,
rotation
))
map
.
animateCamera
(
cameraUpdate
,
duration
.
toLong
(),
animateCallback
)
}
}
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