use of com.amap.api.navi.model.NaviLatLng in project YourEyes by SevenLJY.
the class NaviActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_basic_navi);
destination = new NaviLatLng(103.0, 30.0);
mAMapNaviView = (AMapNaviView) findViewById(R.id.navi_view);
mAMapNaviView.onCreate(savedInstanceState);
mAMapNaviView.setAMapNaviViewListener(this);
}
use of com.amap.api.navi.model.NaviLatLng in project YourEyes by SevenLJY.
the class BasicWalkNaviActivity method onInitNaviSuccess.
@Override
public void onInitNaviSuccess() {
if (latitude == 0) {
ToastUtil.show(BasicWalkNaviActivity.this, "出现未知异常 请重启应用");
} else {
NaviLatLng myLatLng = new NaviLatLng(myLatitude, myLongitude);
NaviLatLng latLng = new NaviLatLng(latitude, longitude);
mAMapNavi.calculateWalkRoute(myLatLng, latLng);
}
}
use of com.amap.api.navi.model.NaviLatLng in project JustAndroid by chinaltz.
the class MapActivity method popupInfo.
/**
* 根据info为布局上的控件设置信息
*
* @param
* @param
*/
protected void popupInfo(ViewGroup mMarkerLy, int index) {
mMarkerLy.setVisibility(View.VISIBLE);
TextView parkAddressText = (TextView) mMarkerLy.findViewById(R.id.parkAddressText);
TextView canUseParkNumberText = (TextView) mMarkerLy.findViewById(R.id.canUseParkNumberText);
TextView distanceText = (TextView) mMarkerLy.findViewById(R.id.distanceText);
TextView supportOnlineText = (TextView) mMarkerLy.findViewById(R.id.supportOnlineText);
TextView perForTimeText = (TextView) mMarkerLy.findViewById(R.id.perForTimeText);
Button goHereButton = (Button) mMarkerLy.findViewById(R.id.goHereButton);
LinearLayout infoLayout = (LinearLayout) mMarkerLy.findViewById(R.id.parkDetialLineraLayout);
// final int finalIndex = index;
// final ParkInfo info = nearList.get(finalIndex);
parkAddressText.setText("停车场地址");
perForTimeText.setText("停车场距离");
//
// DecimalFormat decimalFormat = new DecimalFormat("0.0");//构造方法的字符格式这里如果小数不足2位,会以0补足.
// String p = decimalFormat.format(distance / 1000);//format 返回的是字符串
distanceText.setText("3KM");
canUseParkNumberText.setText("空车位数量");
supportOnlineText.setText("支持线上支付");
supportOnlineText.setVisibility(View.VISIBLE);
goHereButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(MapActivity.this, AMapNavBaseActivity.class);
NaviLatLng endlatlng = new NaviLatLng(32.0414637353, 118.7851165312);
NaviLatLng beginLatlng = new NaviLatLng(loctionLatLng.latitude, loctionLatLng.longitude);
Bundle bundle = new Bundle();
bundle.putParcelable("beginLatlng", beginLatlng);
bundle.putParcelable("endlatlng", endlatlng);
intent.putExtras(bundle);
startActivity(intent);
// AbToastUtil.showToast(MapActivity.this, "导航");
}
});
infoLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//
}
});
}
Aggregations