【问题标题】:Google maps android showing blue screen for 5.0.2 sony z2 tablet谷歌地图安卓显示 5.0.2 索尼 z2 平板电脑蓝屏
【发布时间】:2015-05-18 12:12:51
【问题描述】:

Google 地图显示 5.0.2 索尼 z2 平板电脑型号的蓝屏,其中显示设备中的当前位置

在平板设备中启用定位服务

这是使用的播放服务版本

 <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();
    }


}

平板电脑地图蓝屏会是什么问题?

【问题讨论】:

  • 请从您的代码实现中截屏和更多内容
  • AndroidManifest.xml 有问题。请参考答案stackoverflow.com/a/29619395/1994950
  • 一切都在清单中,当我向下拖动蓝屏时,我可以看到带有当前位置和我的标记的地图。但默认情况下,当我们 luach 显示蓝屏时

标签: android google-maps google-play-services android-maps


【解决方案1】:

尝试缩小,蓝屏可能意味着您没有真实的位置,而您的纬度和经度为零,将您置于海洋中间,即蓝屏。我发现 Android 5.0 (Lollipop) 存在一些问题,它会立即获取您的位置。有时必须加载大量卫星数据。还要检查系统位置图标(倒泪滴)。

【讨论】:

  • 我已将播放服务升级到最新版本,现在至少蓝屏会在几秒钟后自动出现然后地图出现
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多