谷歌地图显示5.0.2版索尼z2平板电脑型号的蓝屏,其中显示设备中的当前位置
在平板电脑设备中启用了定位服务
以下是play服务版本,使用
<integer name="google_play_services_version">7095000</integer>以下是在地图上显示当前位置的源代码
@Override
public void onLocationChanged(Location location) {
// TextView locationTv = (TextView) findViewById(R.id.latlongLocation);
try {
latitude = location.getLatitude();
longitude = location.getLongitude();
LatLng latLng = new LatLng(latitude, longitude);
String address = getLocationName(latitude,longitude);
if(mCurrentLocationMarker != null){
mCurrentLocationMarker.remove();
}
mCurrentLocationMarker = googleMap.addMarker(new MarkerOptions().position(latLng).title(address));
googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
googleMap.animateCamera(CameraUpdateFactory.zoomTo(15));
Log.i(TAG, "Latitude:" + latitude + "," + "Longitude:" + longitude);
} catch (Exception e) {
e.printStackTrace();
}
}平板电脑的地图蓝屏会有什么问题?
发布于 2015-05-18 20:41:05
试着缩小,蓝屏可能意味着你没有真实的位置,你的经度和经度是零,把你放在海洋的中间,也就是蓝屏。我看到了一些Android 5.0 (棒棒糖)的问题,它可以立即得到你的位置。有时需要加载大量的卫星数据。还要检查系统位置图标(反转的催泪器)。
https://stackoverflow.com/questions/30302928
复制相似问题