我正在开发一个应用程序的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的同一位置开始,并将蓝点放在该位置上?