From daa42fc49f9ca5e69684824fb4396c3d8a57f84e Mon Sep 17 00:00:00 2001 From: Brad Leege Date: Mon, 10 Aug 2015 15:41:02 -0500 Subject: [PATCH] #1856 - Removing FAB from SDK and replacing with intial tracking mode API. Making Compass visible under Toolbar. --- .../com/mapbox/mapboxgl/views/MapView.java | 107 +++++------------- .../drawable-hdpi/ic_explore_black_24dp.png | Bin 465 -> 0 bytes .../ic_my_location_black_24dp.png | Bin 549 -> 0 bytes .../drawable-mdpi/ic_explore_black_24dp.png | Bin 322 -> 0 bytes .../ic_my_location_black_24dp.png | Bin 341 -> 0 bytes .../drawable-xhdpi/ic_explore_black_24dp.png | Bin 624 -> 0 bytes .../ic_my_location_black_24dp.png | Bin 660 -> 0 bytes .../drawable-xxhdpi/ic_explore_black_24dp.png | Bin 913 -> 0 bytes .../ic_my_location_black_24dp.png | Bin 976 -> 0 bytes .../ic_explore_black_24dp.png | Bin 1219 -> 0 bytes .../ic_my_location_black_24dp.png | Bin 1334 -> 0 bytes .../src/main/res/values/strings.xml | 1 - .../mapbox/mapboxgl/testapp/MainActivity.java | 14 +++ .../src/main/res/menu/menu_drawer.xml | 13 +++ .../src/main/res/values/strings.xml | 3 + 15 files changed, 57 insertions(+), 81 deletions(-) delete mode 100644 android/java/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/ic_explore_black_24dp.png delete mode 100644 android/java/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/ic_my_location_black_24dp.png delete mode 100644 android/java/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/ic_explore_black_24dp.png delete mode 100644 android/java/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/ic_my_location_black_24dp.png delete mode 100644 android/java/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/ic_explore_black_24dp.png delete mode 100644 android/java/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/ic_my_location_black_24dp.png delete mode 100644 android/java/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/ic_explore_black_24dp.png delete mode 100644 android/java/MapboxGLAndroidSDK/src/main/res/drawable-xxhdpi/ic_my_location_black_24dp.png delete mode 100644 android/java/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/ic_explore_black_24dp.png delete mode 100644 android/java/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/ic_my_location_black_24dp.png diff --git a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java index 953bd6ae0a2..fe146cf0d1b 100644 --- a/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java +++ b/android/java/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxgl/views/MapView.java @@ -11,7 +11,6 @@ import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.BitmapFactory; -import android.graphics.Color; import android.graphics.Matrix; import android.graphics.PointF; import android.hardware.GeomagneticField; @@ -26,7 +25,6 @@ import android.os.Bundle; import android.support.annotation.NonNull; import android.support.design.widget.FloatingActionButton; -import android.support.v4.content.res.ResourcesCompat; import android.support.v4.view.GestureDetectorCompat; import android.support.v4.view.ScaleGestureDetectorCompat; import android.text.TextUtils; @@ -126,13 +124,18 @@ public class MapView extends FrameLayout implements LocationListener { // Holds the context private Context mContext; - // Used for GPS + // Used for GPS / Location private boolean mIsGpsOn = false; private LostApiClient mLocationClient; private LocationRequest mLocationRequest; private ImageView mGpsMarker; private Location mGpsLocation; + public enum UserLocationTrackingMode { + NONE, FOLLOW, FOLLOW_BEARING; + } + private UserLocationTrackingMode userLocationTrackingMode = UserLocationTrackingMode.FOLLOW; + // Used for compass private boolean mIsCompassEnabled = true; private ImageView mCompassView; @@ -149,13 +152,13 @@ public class MapView extends FrameLayout implements LocationListener { private boolean mCompassValid = false; // Used for map toggle mode - private FloatingActionButton trackingModeButton; - private int trackingMode = 0; +// private FloatingActionButton trackingModeButton; private long t0 = new Date().getTime(); // Used to manage Event Listeners private ArrayList mOnMapChangedListener; + // // Properties // @@ -299,26 +302,12 @@ private void initialize(Context context, AttributeSet attrs) { mCompassView.setContentDescription(getResources().getString(R.string.compassContentDescription)); LayoutParams lp = new FrameLayout.LayoutParams((int)(48 * mScreenDensity), (int)(48 * mScreenDensity)); lp.gravity = Gravity.TOP | Gravity.END; - int tenDp = (int)(10 * mScreenDensity); - lp.setMargins(tenDp, tenDp, tenDp, tenDp); + int twentyDp = (int)(20 * mScreenDensity); + lp.setMargins(twentyDp, twentyDp * 4, twentyDp, twentyDp); mCompassView.setLayoutParams(lp); addView(mCompassView); mCompassView.setOnClickListener(new CompassOnClickListener()); - // Setup tracking mode - trackingModeButton = new FloatingActionButton(mContext); - trackingModeButton.setContentDescription(getResources().getString(R.string.trackingModeButtonContentDescription)); - trackingModeButton.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.background_material_light))); - trackingModeButton.setElevation(4); - trackingModeButton.setImageBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.ic_my_location_black_24dp)); - LayoutParams lp2 = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); - lp2.gravity = Gravity.BOTTOM | Gravity.END; - int twentyDp = (int)(20 * mScreenDensity); - lp2.setMargins(twentyDp, twentyDp, twentyDp, twentyDp); - trackingModeButton.setLayoutParams(lp2); - addView(trackingModeButton); - trackingModeButton.setOnClickListener(new ToggleModeClickListener()); - // Setup Support For Listener Tracking // MapView's internal listener is setup in onCreate() mOnMapChangedListener = new ArrayList(); @@ -512,6 +501,14 @@ public void toggleDebug() { mNativeMapView.toggleCollisionDebug(); } + public UserLocationTrackingMode getUserLocationTrackingMode() { + return userLocationTrackingMode; + } + + public void setUserLocationTrackingMode(UserLocationTrackingMode userLocationTrackingMode) { + this.userLocationTrackingMode = userLocationTrackingMode; + } + public boolean isFullyLoaded() { return mNativeMapView.isFullyLoaded(); } @@ -916,10 +913,6 @@ public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float d return false; } - if (trackingMode != 0) { - setTrackingMode(0); - } - // Cancel any animation mNativeMapView.cancelTransitions(); // TODO need to test canceling // transitions with touch @@ -1608,11 +1601,9 @@ private class CompassOnClickListener implements View.OnClickListener { @Override public void onClick(View view) { - if(trackingMode == 2){ - setTrackingMode(0); - } resetNorth(); } + } /** @@ -1629,12 +1620,6 @@ public void onLocationChanged(Location location) { private void updateLocation(Location location) { if (location != null) { mGpsLocation = location; - - // Update map position if in follow mode - if (trackingMode != 0) { - setCenterCoordinate(new LatLng(mGpsLocation)); - } - updateMap(); } } @@ -1679,7 +1664,7 @@ private void updateMap() { mGpsMarker.requestLayout(); // Update direction if tracking mode - if(trackingMode == 2 && mCompassValid){ + if(userLocationTrackingMode == UserLocationTrackingMode.FOLLOW_BEARING && mCompassValid){ // TODO need to do proper filtering (see branch filter-compass) or else map will lock up because of all the compass events long t = new Date().getTime(); if((t-t0)>1000){ @@ -1688,6 +1673,13 @@ private void updateMap() { } } +/* + // Update map position if NOT in NONE mode + if (userLocationTrackingMode != UserLocationTrackingMode.NONE) { + setCenterCoordinate(new LatLng(mGpsLocation)); + } +*/ + /* // Used For User Location Bearing UI if (mGpsLocation.hasBearing() || mCompassValid) { @@ -1708,49 +1700,4 @@ private void updateMap() { } } } - - private class ToggleModeClickListener implements OnClickListener { - @Override - public void onClick(View v) { - setTrackingMode((trackingMode + 1) % 3); - } - } - - public void setTrackingMode(int trackingMode) { - - this.trackingMode = trackingMode; - - switch (trackingMode) { - - case 0: { - trackingModeButton.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_my_location_black_24dp, mContext.getTheme())); - trackingModeButton.setColorFilter(Color.TRANSPARENT); - updateMap(); - } - break; - - case 1: { - trackingModeButton.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_my_location_black_24dp, mContext.getTheme())); - trackingModeButton.setColorFilter(Color.BLUE); - if(mGpsLocation != null){ - setCenterCoordinate(new LatLng(mGpsLocation)); - } - updateMap(); - } - break; - - case 2: { - trackingModeButton.setImageDrawable(ResourcesCompat.getDrawable(getResources(), R.drawable.ic_explore_black_24dp, mContext.getTheme())); - trackingModeButton.setColorFilter(Color.BLUE); - if(mGpsLocation != null){ - setCenterCoordinate(new LatLng(mGpsLocation)); - } - updateMap(); - } - break; - - default: - break; - } - } } diff --git a/android/java/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/ic_explore_black_24dp.png b/android/java/MapboxGLAndroidSDK/src/main/res/drawable-hdpi/ic_explore_black_24dp.png deleted file mode 100644 index f4bc5acd008d74f521e382cc37930af05e787cc5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 465 zcmV;?0WSWDP)zzL>$B+NW=(k(oRL_AU;FzAqu5*C^0&T zOH#PrlBm#U%VTt^ddBr-ipjD>8w;9Ll2VBV9+G%7o2U=DPIa0>Q>Y@@Q(4ggJOPQ63J zPf@m7_Of3r$l4J(^(8JdwXjczgZ=7Yq+FWCCT}XAvHG*iR93pm_1S5Hp zGX{g3?7{FW1~WTE1v&0B)$aWAV|TJUEMI4Vh=>I~Eg~f)`bUbsvBa4vI%APZJ|NE; zS0tp?c;%8+^1MTZHfhFaF~^AZ80bfR8dQmisnWF0?lOWOivMAs61I>7o-}(5etQc3 zW(t=Q*GlZ*QPJi9WQ;5UCnl3HONKmcUCkIi0XHVsB!|$`+Jp$PIdkEDiW5@$l+e}KHK>XL2GeFWdrUB7$wV6n8>Ei0iSS^K z=Z7{5y;D_$J7-ZHp=ORx?M)`Kf-yqJS=6;x2@N7&(Tl%`L%Ya#YYk`7z30|sQ4g80 z*Lne78Wk85Q(Xo|0QUIf@zkeKuOA|f-32DEnDS;fBGv_$1n#m_CUSyLx zUAo+}P64FMv&k;wl-GS<6W|kYt7j@lhB^8sazfy#`K4`S29I5>#|uP4vFFe9;gv>NR1ZS{7KkmM6)zWGe(^m-XX^d7xb_zdYrRNjt`h% no>RS36~_OkuMzu0>#O_)RZ4aRmaPDG00000NkvXXu0mjf7M<-G diff --git a/android/java/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/ic_explore_black_24dp.png b/android/java/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/ic_explore_black_24dp.png deleted file mode 100644 index 3c9da64daa13096c7d7309c61530260d8c58228b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 322 zcmV-I0lof-P)db|w-s4}^E&zOs{y}JZgEeY3xY9-cCUm`HF4TT% zRoL~uDLdGr)@qb4{ml;=QThNXB{q_XSK%?rI{=q9{`3a-!XkdtCvasaj)}~KN_(oF zaqYW*(jbizVR|Z8UL2)tZs^-fBe^wDj7)Y4SrhM>+i#30%{_Q?aPaEhOzF)20~&+} U`B9}ZjsO4v07*qoM6N<$f`Gb?E&u=k diff --git a/android/java/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/ic_my_location_black_24dp.png b/android/java/MapboxGLAndroidSDK/src/main/res/drawable-mdpi/ic_my_location_black_24dp.png deleted file mode 100644 index 5684aa7dc5d4dd20ffac6d3191a20b810fa3b56c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 341 zcmV-b0jmCqP)mMbk{NI>0N1x?|uus^FEj=X)&pHzW-zSTS)^M<$cW&4ZYJcs=$YBhD;OSn~x>^datnyArVw)DU;Gg0)Zj8#)n zvEOVsVD8IDj$T&^mqn$1cGf=f59R|YEe}L#KYAzm#9c{d-LoWdQk3+qH>6fP6iLS= zHbg$(d&OcGMVj*x+ajNrE!Hs-X$BHI|GPPJM;)=(IkB*z#8_l|6Y!A`w#>EN6$=|l zEUvs>fMIi-OW zpO{oQRv$a4v99;s%YSoR@|?%ka@=_XLn9LtBSQo0UbEy0@YH_@FdzKA=A!Zd0000< KMNUMnLSTY+uq#CX diff --git a/android/java/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/ic_my_location_black_24dp.png b/android/java/MapboxGLAndroidSDK/src/main/res/drawable-xhdpi/ic_my_location_black_24dp.png deleted file mode 100644 index 7faa3455f60127e423ab3cd481745bfa47eb121f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 660 zcmV;F0&D$=P)%+^Dn#{hi&+J@;JCoEaj|OrYZL7kDW!#0DpPlLFTqv(5ld zAjt|ff|$5qnIwEe*UG7d=7p)6Mf5+2YK8}7}aF5bzPJQLg7;+9r@&{7z|1J zU}*a)K}1wSB}VX7?ptDQsMOEs$JcXc0 zV2FJLGxFJJ)tW{hf?H#O8w9!5yYU4a1oy@Q4Fv9gR3M9>ZY*UlM_nxwYhB(^tOj)t-4}Irl~@CEvS9>iDv{ft<02T9Penfl z7b>}gE={qeQ9gUP=*sff8!fA4O(qD-v(F6;8hGq7M%bhrU=gDvo?2KZgRNKG$#1>{ zZ7fI|PDx?I;Y=DghlK;JM8@LuXZl-VBh96x)S19!k~>-Z6$eYbc#_uSkP)JcQr2ec zCvUJv54F%xR@r8T94;<7X4z4%m7Jc}bjYPZU==>QI6TNaKiY18%^Z)AV2LVz%*iV( ulHduvV~rziwk|2NO8>wAC-9}f^Y90NP?&Wf5nE#b0000Lj*;LMDWmqP|#Ltp}90M zZH3m0hIl9#SYt4Rk_P+(x-7+_vV@=&+MVeB>cKF^*_nA~-gm^qe!k~~m&}`Ip5dL< z($dn&F~*o;kt!>Ac&t!mktxPFN(XOIiPOyEp@{0-uGCQCG-eX$xiKu-m+kg(AzyaZ40QX$#9JgO(_e zLK|h2QM2So?0b}9-;&S}a$19FMiG8rBpZWIkh44{`52gaV=k32_6u^R1`L!q4{(tL_N=K>|7jG&0_5TO$f zCFpO?P$1fSR8d6#ktftKl%Oxk5pNj9G(e~^WZVOCn7EH(I!mZ2WZW4{e1>A1B-CPp zt6adBr~hSng62?c3xuj7!!F?K;SoYSq??VpkwFzgtr*Xp66^9j!oOE-yzT}vs75Fc z88wctAK`ZZ-(DKXpt|jWUa-gLKtCX(>b8&UIfaT1eu=zEAV4|JJ$hc8L9Yrw>86D><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gKFTtqKXKtYoh+oBMdY}tKhfb6oA6nO&30~)N1UaXjigBuB}$Ss z8|mXLzuJ5vKEVbmpovi|A7X^%R7jLl6pc2%$O$4;)OS2H*8Hcer3&WJ$6L>he?t!; zswT#MUb}AmEA|ni>OyScuEWFb0(Zy~qJ}KyXD-_xcQC;)-6W_{U$L4ljxnq>e3)Z& su^MB7e}oGX2oeYq2oeYq2m}KE19wYc%&+VoivR!s07*qoM6N<$g8N!-_W%F@ diff --git a/android/java/MapboxGLAndroidSDK/src/main/res/values/strings.xml b/android/java/MapboxGLAndroidSDK/src/main/res/values/strings.xml index 78e20893b6a..df022a4679a 100644 --- a/android/java/MapboxGLAndroidSDK/src/main/res/values/strings.xml +++ b/android/java/MapboxGLAndroidSDK/src/main/res/values/strings.xml @@ -1,5 +1,4 @@ Map compass. Click to reset the map rotation to North. - Press button to toggle tracking modes (None, Follow, FollowWithHeading) diff --git a/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxgl/testapp/MainActivity.java b/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxgl/testapp/MainActivity.java index 5e0e0002a70..8fbd17d2d52 100644 --- a/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxgl/testapp/MainActivity.java +++ b/android/java/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxgl/testapp/MainActivity.java @@ -287,6 +287,20 @@ public boolean onNavigationItemSelected(MenuItem menuItem) { mapView.setCompassEnabled(!mapView.isCompassEnabled()); break; +/* + case R.id.followNone: + mapView.setUserLocationTrackingMode(MapView.UserLocationTrackingMode.NONE); + break; + + case R.id.followFollow: + mapView.setUserLocationTrackingMode(MapView.UserLocationTrackingMode.FOLLOW); + break; + + case R.id.followBearing: + mapView.setUserLocationTrackingMode(MapView.UserLocationTrackingMode.FOLLOW_BEARING); + break; +*/ + case R.id.actionStyleMapboxStreets: changeMapStyle(getString(R.string.styleURLMapboxStreets)); break; diff --git a/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml b/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml index 1474161e0bf..38288bb5772 100644 --- a/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml +++ b/android/java/MapboxGLAndroidSDKTestApp/src/main/res/menu/menu_drawer.xml @@ -20,6 +20,19 @@ android:title="@string/action_compass" /> + + diff --git a/android/java/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml b/android/java/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml index 40bd286e517..a26fa55e716 100644 --- a/android/java/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml +++ b/android/java/MapboxGLAndroidSDKTestApp/src/main/res/values/strings.xml @@ -4,6 +4,9 @@ Mapbox GL Toggle GPS location + Toggle Location Bearing Tracking + Follow + Bearing Toggle Compass Toggle debug mode Toggle point annotations