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

调整接口

parent 7f2d0d68
...@@ -28,7 +28,7 @@ class AMapViewManager extends SimpleViewManager<AMapView> { ...@@ -28,7 +28,7 @@ class AMapViewManager extends SimpleViewManager<AMapView> {
return new AMapView(reactContext); return new AMapView(reactContext);
} }
@ReactProp(name = "showsUserLocation") @ReactProp(name = "locationEnabled")
public void setMyLocationEnabled(AMapView view, boolean enabled) { public void setMyLocationEnabled(AMapView view, boolean enabled) {
MyLocationStyle locationStyle = new MyLocationStyle(); MyLocationStyle locationStyle = new MyLocationStyle();
locationStyle.myLocationType(MyLocationStyle.LOCATION_TYPE_SHOW); locationStyle.myLocationType(MyLocationStyle.LOCATION_TYPE_SHOW);
...@@ -51,7 +51,7 @@ class AMapViewManager extends SimpleViewManager<AMapView> { ...@@ -51,7 +51,7 @@ class AMapViewManager extends SimpleViewManager<AMapView> {
view.map.showBuildings(show); view.map.showBuildings(show);
} }
@ReactProp(name = "showsMapText") @ReactProp(name = "showsLabels")
public void showMapText(AMapView view, boolean show) { public void showMapText(AMapView view, boolean show) {
view.map.showMapText(show); view.map.showMapText(show);
} }
...@@ -71,16 +71,11 @@ class AMapViewManager extends SimpleViewManager<AMapView> { ...@@ -71,16 +71,11 @@ class AMapViewManager extends SimpleViewManager<AMapView> {
view.ui.setScaleControlsEnabled(enabled); view.ui.setScaleControlsEnabled(enabled);
} }
@ReactProp(name = "showsMyLocationButton") @ReactProp(name = "showsLocationButton")
public void setMyLocationButtonEnabled(AMapView view, boolean enabled) { public void setMyLocationButtonEnabled(AMapView view, boolean enabled) {
view.ui.setMyLocationButtonEnabled(enabled); view.ui.setMyLocationButtonEnabled(enabled);
} }
@ReactProp(name = "mapTextZIndex")
public void setMapTextZIndex(AMapView view, int zIndex) {
view.map.setMapTextZIndex(zIndex);
}
@ReactProp(name = "showsTraffic") @ReactProp(name = "showsTraffic")
public void setTrafficEnabled(AMapView view, boolean enabled) { public void setTrafficEnabled(AMapView view, boolean enabled) {
view.map.setTrafficEnabled(enabled); view.map.setTrafficEnabled(enabled);
......
...@@ -18,7 +18,7 @@ class MapView extends Component { ...@@ -18,7 +18,7 @@ class MapView extends Component {
/** /**
* 是否启用定位 * 是否启用定位
*/ */
showsUserLocation: PropTypes.bool, locationEnabled: PropTypes.bool,
/** /**
* 是否显示室内地图 * 是否显示室内地图
...@@ -36,9 +36,9 @@ class MapView extends Component { ...@@ -36,9 +36,9 @@ class MapView extends Component {
showsBuildings: PropTypes.bool, showsBuildings: PropTypes.bool,
/** /**
* 是否显示地图文本 * 是否显示文本标签
*/ */
showsMapText: PropTypes.bool, showsLabels: PropTypes.bool,
/** /**
* 是否显示指南针 * 是否显示指南针
...@@ -58,7 +58,7 @@ class MapView extends Component { ...@@ -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