Search in sources :

Example 1 with NaviLatLng

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);
}
Also used : NaviLatLng(com.amap.api.navi.model.NaviLatLng)

Example 2 with NaviLatLng

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);
    }
}
Also used : NaviLatLng(com.amap.api.navi.model.NaviLatLng)

Example 3 with NaviLatLng

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) {
        //
        }
    });
}
Also used : Button(android.widget.Button) Bundle(android.os.Bundle) NaviLatLng(com.amap.api.navi.model.NaviLatLng) TextView(android.widget.TextView) Intent(android.content.Intent) AMapNavBaseActivity(com.litingzhe.justandroid.ui.mapView.AMapUtils.AMapNavBaseActivity) MapView(com.amap.api.maps.MapView) ImageView(android.widget.ImageView) BindView(butterknife.BindView) View(android.view.View) AdapterView(android.widget.AdapterView) HorizontalListView(com.ningcui.mylibrary.viewLib.HorizontalListView) TextView(android.widget.TextView) LinearLayout(android.widget.LinearLayout)

Aggregations

NaviLatLng (com.amap.api.navi.model.NaviLatLng)3 Intent (android.content.Intent)1 Bundle (android.os.Bundle)1 View (android.view.View)1 AdapterView (android.widget.AdapterView)1 Button (android.widget.Button)1 ImageView (android.widget.ImageView)1 LinearLayout (android.widget.LinearLayout)1 TextView (android.widget.TextView)1 BindView (butterknife.BindView)1 MapView (com.amap.api.maps.MapView)1 AMapNavBaseActivity (com.litingzhe.justandroid.ui.mapView.AMapUtils.AMapNavBaseActivity)1 HorizontalListView (com.ningcui.mylibrary.viewLib.HorizontalListView)1