我正在開發一個應用程序的Android與谷歌地圖。問題是,當我在谷歌地圖上激活「setMyLocationEnabled」時,它將我的位置設置到香港,但我在葡萄牙。但locationManager給出的位置給了我正確的位置。有沒有一種方法來定義我的位置是「setMyLocationEnabled」上locationManager的位置?在谷歌地圖上定義我的位置setMyLocationEnabled eclipse
這使我有我的正確位置:
Criteria criteria = new Criteria();
Location myLocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));
Lat = myLocation.getLatitude();
Long = myLocation.getLongitude();
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 20000, 1, this);
但這:
googleMap.setMyLocationEnabled(true);
說,我在香港時,我actualy是在葡萄牙。
如何定義「setMyLocationEnabled」必須在locationManager的同一位置開始,並將藍點放在該位置上?