如何在Google maps api 1上显示当前位置?

时间:2013-03-08 17:27:02

标签: android maps location

我创建了一个简单的应用程序来显示位置坐标。现在我想用谷歌地图展示它并在谷歌地图api v1上点。我怎么能这样做?

   public class LocTracker extends Activity implements LocationListener {

        public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.loctracker);
        latituteField = (TextView) findViewById(R.id.lat);
         longitudeField = (TextView) findViewById(R.id.lon);
    }


    public void onLocationChanged(Location location) {

    double lat = location.getLatitude();
    double lng = location.getLongitude();
     }
    }

我如何将其转换为显示地图?我知道必须使用MapActivity和mapview ...我有关键...并在另一个草图中测试...工作只显示地图

0 个答案:

没有答案