我得到一个蓝屏当我加载Android上我的谷歌地图。我不知道我做错了,这是我得到的位置代码:
MapView mapView = (MapView) findViewById(R.id.mapDire);
Route route = directions(new GeoPoint((int)(2*1E6),(int)(34*1E6)),
new GeoPoint((int)(3*1E6),(int)(36*1E6)));
我在我的应用程序有这个问题,看看下面的代码onlocationchanged
方法和解决问题。
LatLng myCoordinates = new LatLng(location.getLatitude(), location.getLongitude());
mMap.moveCamera(CameraUpdateFactory.newLatLng(myCoordinates));
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 17.0f));
marker.setPosition(myCoordinates);
通常蓝屏意味着您的谷歌API密钥不工作。
如果地图没有显示,只有网格/白屏显示,那是因为你的地图API密钥缺失或不正确。注册为谷歌Android地图API。
试试这个the link获取更多信息。