【发布时间】:2013-05-06 14:06:04
【问题描述】:
长期以来,我一直在尝试在 Android 中显示特定位置的街景,但不幸的是无法成功。
我需要的是,如果我向地图提供位置(纬度,经度),它应该显示该特定位置的街景。
以下是显示地图、3D 地图、混合地图、卫星视图等的工作代码。 但没有显示 STREETVIEW...
mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
mMap.addMarker(new MarkerOptions().position(new LatLng(33.748832, -84.38751300000001)).title("Marker"));
mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
mMap.setTrafficEnabled(true);
CameraPosition cameraPosition = new CameraPosition.Builder()
.zoom(17) // Sets the zoom
.target(new LatLng(33.748832, -84.38751300000001))
.bearing(90) // Sets the orientation of the camera to east
.tilt(30) // Sets the tilt of the camera to 30 degrees
.build(); // Creates a CameraPosition from the builder
mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
我只需要某种方式来显示街景。
【问题讨论】:
标签: android google-maps google-maps-android-api-2 google-street-view