[android] - fixup MyLocationView heading (#6671)

[android] - convert angles to radiants in jni, correct follow animation for MyLocationView

do not sanitise input when recreating from other camera object, input is already sanitised before

cleanup mylocationview, made animation bit more smooth, improved UX when switching between tracking modes

cleanup CameraUpdateFactory, hide internally used api.

only invalidate position if required, remove outdated comments

correct camera position values

made zoom activity a bit more interesting

made dynamic marker activity a bit more interesting

FIXUP
This commit is contained in:
Tobrun
2016-10-18 17:56:39 +02:00
committed by GitHub
parent 87885008a6
commit 0ccc7f51ba
9 changed files with 80 additions and 81 deletions

View File

@@ -54,8 +54,6 @@ public class DynamicMarkerChangeActivity extends AppCompatActivity {
@Override
public void onMapReady(@NonNull MapboxMap mapboxMap) {
DynamicMarkerChangeActivity.this.mapboxMap = mapboxMap;
mapboxMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(51.506675, -0.128699), 10));
// Create marker
MarkerOptions markerOptions = new MarkerOptions()
.position(LAT_LNG_CHELSEA)

View File

@@ -25,7 +25,12 @@
<com.mapbox.mapboxsdk.maps.MapView
android:id="@id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
app:center_latitude="51.506675"
app:center_longitude="-0.128699"
app:direction="90"
app:tilt="40"
app:zoom="10" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"

View File

@@ -2,6 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
@@ -13,6 +14,10 @@
<com.mapbox.mapboxsdk.maps.MapView
android:id="@id/mapView"
app:center_latitude="50.871062"
app:center_longitude="1.583210"
app:direction="220"
app:zoom="10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/toolbar" />