Commit 264cb0eb authored by Qiu Xiang's avatar Qiu Xiang

调整接口

parent 7f2d0d68
......@@ -28,7 +28,7 @@ class AMapViewManager extends SimpleViewManager<AMapView> {
return new AMapView(reactContext);
}
@ReactProp(name = "showsUserLocation")
@ReactProp(name = "locationEnabled")
public void setMyLocationEnabled(AMapView view, boolean enabled) {
MyLocationStyle locationStyle = new MyLocationStyle();
locationStyle.myLocationType(MyLocationStyle.LOCATION_TYPE_SHOW);
......@@ -51,7 +51,7 @@ class AMapViewManager extends SimpleViewManager<AMapView> {
view.map.showBuildings(show);
}
@ReactProp(name = "showsMapText")
@ReactProp(name = "showsLabels")
public void showMapText(AMapView view, boolean show) {
view.map.showMapText(show);
}
......@@ -71,16 +71,11 @@ class AMapViewManager extends SimpleViewManager<AMapView> {
view.ui.setScaleControlsEnabled(enabled);
}
@ReactProp(name = "showsMyLocationButton")
@ReactProp(name = "showsLocationButton")
public void setMyLocationButtonEnabled(AMapView view, boolean enabled) {
view.ui.setMyLocationButtonEnabled(enabled);
}
@ReactProp(name = "mapTextZIndex")
public void setMapTextZIndex(AMapView view, int zIndex) {
view.map.setMapTextZIndex(zIndex);
}
@ReactProp(name = "showsTraffic")
public void setTrafficEnabled(AMapView view, boolean enabled) {
view.map.setTrafficEnabled(enabled);
......
......@@ -18,7 +18,7 @@ class MapView extends Component {
/**
* 是否启用定位
*/
showsUserLocation: PropTypes.bool,
locationEnabled: PropTypes.bool,
/**
* 是否显示室内地图
......@@ -36,9 +36,9 @@ class MapView extends Component {
showsBuildings: PropTypes.bool,
/**
* 是否显示地图文本
* 是否显示文本标签
*/
showsMapText: PropTypes.bool,
showsLabels: PropTypes.bool,
/**
* 是否显示指南针
......@@ -58,7 +58,7 @@ class MapView extends Component {
/**
* 是否显示定位按钮
*/
showsMyLocationButton: PropTypes.bool,
showsLocationButton: PropTypes.bool,
/**
* 是否显示路况
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment