SupportMapFragment
のズームレベルを設定するにはどうすればよいですか?SupportMapフラグメントセットgoogle mapsズームレベル
LatLng currentLocation = mService.getCurrentLocation();
CameraPosition cameraPosition = new CameraPosition.Builder()
.target(currentLocation) // Sets the center of the map to the current location of the user
.zoom(17) // Sets the zoom
.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
mGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
をしかし、このソリューションが動作しませんでした: 私はこの1つが提案されているロブという名前の男を買う答えのように私は、同様の質問で見つかったいくつかの回答を試してみました。だから、どのように私はSupportMapFragment
を使用することを知ってズームレベルを設定することができます。あなたの現在の場所は、このコードを試してみnullでない場合
ThxをMustanserに動作します:)これは正常に動作 – TeachMePls