如何在Android中制定方向?

时间:2013-07-05 07:51:32

标签: android google-maps

我制作了一个包含“MyLocation,LocationCar和Direction”的菜单 点击后我想要方向菜单会显示她MyLocationLocationCar的方向。

如何制作,是否有可以帮助我的教程? enter image description here

这是我的菜单代码:

@Override
 public boolean onOptionsItemSelected(MenuItem item) {
  switch (item.getItemId()) {
  case MENU_MyLocation:
      map.setMyLocationEnabled(true);
   return(true);
  case MENU_LocationCar:
   startActivity(new Intent(this, Gps.class));
   return(true);
  case MENU_Direction:
      // here to show the direction of MyLocation to LocationCar??
   return(true);
  }

  return(super.onOptionsItemSelected(item));
 }

0 个答案:

没有答案