summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Zugaldia <antonio@mapbox.com>2015-12-03 09:27:21 -0500
committerBrad Leege <bleege@gmail.com>2015-12-03 16:57:43 -0600
commit5024d45c631cd5629a028447a6faf394b1aa20f4 (patch)
treec50a060f882155924c651ce031606922b94c8e27
parent349f47ba92d26089ec70e94603e3e27f0a69a6ac (diff)
downloadqtlocation-mapboxgl-5024d45c631cd5629a028447a6faf394b1aa20f4.tar.gz
[android] #2805 - Create a target to keep both location values consistent.
-rw-r--r--android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/TiltActivity.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/TiltActivity.java b/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/TiltActivity.java
index 9b566a9500..3d889e8457 100644
--- a/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/TiltActivity.java
+++ b/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/TiltActivity.java
@@ -33,12 +33,13 @@ public class TiltActivity extends AppCompatActivity {
// Target
LatLng dc = new LatLng(38.90252, -77.02291);
LatLng nyc = new LatLng(40.73581, -73.99155);
+ LatLng target = nyc;
// Set up the map
mMapView = (MapView) findViewById(R.id.tiltMapView);
mMapView.setAccessToken(ApiAccess.getToken(this));
mMapView.setStyleUrl(Style.MAPBOX_STREETS);
- mMapView.setCenterCoordinate(dc);
+ mMapView.setCenterCoordinate(target);
mMapView.setZoomLevel(11);
mMapView.onCreate(savedInstanceState);
@@ -49,7 +50,7 @@ public class TiltActivity extends AppCompatActivity {
// Construct a CameraPosition focusing on target and animate the camera to that position.
CameraPosition cameraPosition = new CameraPosition.Builder()
- .target(nyc) // Sets the center of the map to target
+ .target(target) // Sets the center of the map to target
.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