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
be9d91e9
Commit
be9d91e9
authored
May 28, 2017
by
Qiu Xiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整默认定位模式
parent
d732554b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
AMapView.java
android/src/main/java/cn/qiuxiang/react/amap3d/AMapView.java
+6
-0
AMapViewManager.java
...c/main/java/cn/qiuxiang/react/amap3d/AMapViewManager.java
+0
-3
No files found.
android/src/main/java/cn/qiuxiang/react/amap3d/AMapView.java
View file @
be9d91e9
package
cn
.
qiuxiang
.
react
.
amap3d
;
import
android.content.Context
;
import
android.graphics.Color
;
import
com.amap.api.maps.AMap
;
import
com.amap.api.maps.MapView
;
import
com.amap.api.maps.UiSettings
;
import
com.amap.api.maps.model.MyLocationStyle
;
public
class
AMapView
extends
MapView
{
public
final
AMap
map
;
public
final
UiSettings
ui
;
public
final
MyLocationStyle
locationStyle
;
public
AMapView
(
Context
context
)
{
super
(
context
);
super
.
onCreate
(
null
);
map
=
this
.
getMap
();
ui
=
map
.
getUiSettings
();
locationStyle
=
new
MyLocationStyle
();
locationStyle
.
myLocationType
(
MyLocationStyle
.
LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER
);
map
.
setMyLocationStyle
(
locationStyle
);
}
}
android/src/main/java/cn/qiuxiang/react/amap3d/AMapViewManager.java
View file @
be9d91e9
...
...
@@ -30,9 +30,6 @@ class AMapViewManager extends SimpleViewManager<AMapView> {
@ReactProp
(
name
=
"locationEnabled"
)
public
void
setMyLocationEnabled
(
AMapView
view
,
boolean
enabled
)
{
MyLocationStyle
locationStyle
=
new
MyLocationStyle
();
locationStyle
.
myLocationType
(
MyLocationStyle
.
LOCATION_TYPE_SHOW
);
view
.
map
.
setMyLocationStyle
(
locationStyle
);
view
.
map
.
setMyLocationEnabled
(
enabled
);
}
...
...
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