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
19142683
Commit
19142683
authored
Aug 27, 2017
by
Qiu Xiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 MapView#locationInterval 接口
相关:#37、#41
parent
b7eba783
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
AMapView.kt
...d/src/main/java/cn/qiuxiang/react/amap3d/maps/AMapView.kt
+5
-0
AMapViewManager.kt
...ain/java/cn/qiuxiang/react/amap3d/maps/AMapViewManager.kt
+5
-0
MapView.js
components/maps/MapView.js
+7
-0
No files found.
android/src/main/java/cn/qiuxiang/react/amap3d/maps/AMapView.kt
View file @
19142683
...
...
@@ -220,4 +220,9 @@ class AMapView(context: Context) : TextureMapView(context) {
map
.
myLocationStyle
=
locationStyle
map
.
isMyLocationEnabled
=
enabled
}
fun
setLocationInterval
(
interval
:
Long
)
{
locationStyle
.
interval
(
interval
)
map
.
myLocationStyle
=
locationStyle
}
}
android/src/main/java/cn/qiuxiang/react/amap3d/maps/AMapViewManager.kt
View file @
19142683
...
...
@@ -185,4 +185,9 @@ internal class AMapViewManager : ViewGroupManager<AMapView>() {
fun
changeRotation
(
view
:
AMapView
,
rotation
:
Float
)
{
view
.
map
.
moveCamera
(
CameraUpdateFactory
.
changeBearing
(
rotation
))
}
@ReactProp
(
name
=
"locationInterval"
)
fun
setLocationInterval
(
view
:
AMapView
,
interval
:
Int
)
{
view
.
setLocationInterval
(
interval
.
toLong
())
}
}
components/maps/MapView.js
View file @
19142683
...
...
@@ -31,6 +31,13 @@ export default class MapView extends BaseComponent {
*/
locationEnabled
:
PropTypes
.
bool
,
/**
* 定位间隔(ms),默认 2000,小于 1000 将只进行单次定位
*
* @platform android
*/
locationInterval
:
PropTypes
.
number
,
/**
* 是否显示室内地图
*/
...
...
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