Fix zooming issue

This commit is contained in:
neslihanturan 2018-03-14 00:59:08 +03:00
parent 3288fb05a4
commit 75f27a332f
2 changed files with 7 additions and 3 deletions

View file

@ -251,7 +251,7 @@ public class NearbyMapFragment extends DaggerFragment {
new LatLng(curMapBoxLatLng.getLatitude()- CAMERA_TARGET_SHIFT_FACTOR, new LatLng(curMapBoxLatLng.getLatitude()- CAMERA_TARGET_SHIFT_FACTOR,
curMapBoxLatLng.getLongitude()) curMapBoxLatLng.getLongitude())
: curMapBoxLatLng ) // Sets the new camera position : curMapBoxLatLng ) // Sets the new camera position
.zoom(11) // Same zoom level .zoom(mapboxMap.getCameraPosition().zoom) // Same zoom level
.build(); .build();
mapboxMap.animateCamera(CameraUpdateFactory mapboxMap.animateCamera(CameraUpdateFactory
@ -270,7 +270,7 @@ public class NearbyMapFragment extends DaggerFragment {
.target(new LatLng(curLatLng.getLatitude() - CAMERA_TARGET_SHIFT_FACTOR, .target(new LatLng(curLatLng.getLatitude() - CAMERA_TARGET_SHIFT_FACTOR,
curLatLng.getLongitude())) // Sets the new camera target above curLatLng.getLongitude())) // Sets the new camera target above
// current to make it visible when sheet is expanded // current to make it visible when sheet is expanded
.zoom(11) // Same zoom level .zoom(mapboxMap.getCameraPosition().zoom) // Same zoom level
.build(); .build();
} else { } else {
@ -278,7 +278,7 @@ public class NearbyMapFragment extends DaggerFragment {
position = new CameraPosition.Builder() position = new CameraPosition.Builder()
.target(new LatLng(curLatLng.getLatitude(), .target(new LatLng(curLatLng.getLatitude(),
curLatLng.getLongitude())) // Sets the new camera target to curLatLng curLatLng.getLongitude())) // Sets the new camera target to curLatLng
.zoom(11) // Same zoom level .zoom(mapboxMap.getCameraPosition().zoom) // Same zoom level
.build(); .build();
} }
mapboxMap.animateCamera(CameraUpdateFactory mapboxMap.animateCamera(CameraUpdateFactory

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
</selector>