[android] #5738 - default navigation drawer example
[android] #5738 - migrated to MapFragment approach & AppCompat compatible [android] #5378 - make drawer work with inner class fragments [android] #5738 - navigation drawer proposition [android] #5738 - cleanup
This commit is contained in:
@@ -1504,12 +1504,12 @@ public class MapView extends FrameLayout {
|
||||
LatLng tapLatLng = fromScreenLocation(new PointF(xCoordinate, yCoordinate));
|
||||
|
||||
// NaN and Infinite checks to prevent JSON errors at send to server time
|
||||
if (Double.isNaN(tapLatLng.getLatitude()) || Double.isNaN(tapLatLng.getLongitude())) {
|
||||
if (Double.isNaN(tapLatLng.getLatitude()) || Double.isNaN(tapLatLng.getLongitude())) {
|
||||
Log.d(MapView.class.getSimpleName(), "trackGestureEvent() has a NaN lat or lon. Returning.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Double.isInfinite(tapLatLng.getLatitude()) || Double.isInfinite(tapLatLng.getLongitude())) {
|
||||
if (Double.isInfinite(tapLatLng.getLatitude()) || Double.isInfinite(tapLatLng.getLongitude())) {
|
||||
Log.d(MapView.class.getSimpleName(), "trackGestureEvent() has an Infinite lat or lon. Returning.");
|
||||
return;
|
||||
}
|
||||
@@ -1536,12 +1536,12 @@ public class MapView extends FrameLayout {
|
||||
LatLng tapLatLng = fromScreenLocation(new PointF(xCoordinate, yCoordinate));
|
||||
|
||||
// NaN and Infinite checks to prevent JSON errors at send to server time
|
||||
if (Double.isNaN(tapLatLng.getLatitude()) || Double.isNaN(tapLatLng.getLongitude())) {
|
||||
if (Double.isNaN(tapLatLng.getLatitude()) || Double.isNaN(tapLatLng.getLongitude())) {
|
||||
Log.d(MapView.class.getSimpleName(), "trackGestureDragEndEvent() has a NaN lat or lon. Returning.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Double.isInfinite(tapLatLng.getLatitude()) || Double.isInfinite(tapLatLng.getLongitude())) {
|
||||
if (Double.isInfinite(tapLatLng.getLatitude()) || Double.isInfinite(tapLatLng.getLongitude())) {
|
||||
Log.d(MapView.class.getSimpleName(), "trackGestureDragEndEvent() has an Infinite lat or lon. Returning.");
|
||||
return;
|
||||
}
|
||||
@@ -1822,7 +1822,7 @@ public class MapView extends FrameLayout {
|
||||
return false;
|
||||
}
|
||||
|
||||
requestDisallowInterceptTouchEvent(true);
|
||||
// requestDisallowInterceptTouchEvent(true);
|
||||
|
||||
// reset tracking modes if gesture occurs
|
||||
resetTrackingModesIfRequired();
|
||||
@@ -2638,11 +2638,11 @@ public class MapView extends FrameLayout {
|
||||
* @param callback The callback object that will be triggered when the map is ready to be used.
|
||||
*/
|
||||
@UiThread
|
||||
public void getMapAsync(@NonNull final OnMapReadyCallback callback) {
|
||||
if (!mInitialLoad) {
|
||||
public void getMapAsync(final OnMapReadyCallback callback) {
|
||||
if (!mInitialLoad && callback != null) {
|
||||
callback.onMapReady(mMapboxMap);
|
||||
} else {
|
||||
if(callback!=null) {
|
||||
if (callback != null) {
|
||||
mOnMapReadyCallbackList.add(callback);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<FrameLayout
|
||||
android:id="@+id/markerViewContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.widgets.CompassView
|
||||
android:id="@+id/compassView"
|
||||
@@ -28,11 +28,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="@drawable/bg_default_selector"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/attributionsIconContentDescription"
|
||||
android:padding="7dp"
|
||||
android:src="@drawable/ic_info_outline_24dp_selector"
|
||||
android:background="@drawable/bg_default_selector"/>
|
||||
android:src="@drawable/ic_info_outline_24dp_selector" />
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.widgets.MyLocationView
|
||||
android:id="@+id/userLocationView"
|
||||
|
||||
Reference in New Issue
Block a user