summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Paczos <lukas.paczos@gmail.com>2018-10-26 14:41:39 +0200
committerTobrun <tobrun@mapbox.com>2018-10-31 14:53:56 +0100
commit48bbaa6c6ed2306c59fcab58d455bdeb5ddc91c3 (patch)
tree6f54d037682c9a5a054f8480873007020494ddf7
parent11f00c439374238901b1992a940c98ecd59880bf (diff)
downloadqtlocation-mapboxgl-48bbaa6c6ed2306c59fcab58d455bdeb5ddc91c3.tar.gz
[android] option to consume map clicks, consuming location clicks
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponent.java18
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java8
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java8
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PressForMarkerActivity.java12
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/CameraPositionActivity.java3
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/MaxMinZoomActivity.java5
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QuerySourceFeaturesActivity.java2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/InfoWindowActivity.java4
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationMapChangeActivity.java20
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/DoubleMapActivity.java2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/DraggableMarkerActivity.kt3
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolGeneratorActivity.java2
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java4
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/ZoomFunctionSymbolLayerActivity.java2
16 files changed, 75 insertions, 22 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponent.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponent.java
index 9118f926f3..4e17268abb 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponent.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationComponent.java
@@ -583,6 +583,11 @@ public final class LocationComponent {
/**
* Adds a listener that gets invoked when the user clicks the displayed location.
+ * <p>
+ * If there are registered location click listeners and the location is clicked,
+ * only {@link OnLocationClickListener#onLocationComponentClick()} is going to be delivered,
+ * {@link com.mapbox.mapboxsdk.maps.MapboxMap.OnMapClickListener#onMapClick(LatLng)} is going to be consumed
+ * and not pushed to the listeners registered after the component's activation.
*
* @param listener The location click listener that is invoked when the
* location is clicked
@@ -602,6 +607,11 @@ public final class LocationComponent {
/**
* Adds a listener that gets invoked when the user long clicks the displayed location.
+ * <p>
+ * If there are registered location long click listeners and the location is long clicked,
+ * only {@link OnLocationLongClickListener#onLocationComponentLongClick()} is going to be delivered,
+ * {@link com.mapbox.mapboxsdk.maps.MapboxMap.OnMapLongClickListener#onMapLongClick(LatLng)} is going to be consumed
+ * and not pushed to the listeners registered after the component's activation.
*
* @param listener The location click listener that is invoked when the
* location is clicked
@@ -915,23 +925,27 @@ public final class LocationComponent {
private OnMapClickListener onMapClickListener = new OnMapClickListener() {
@Override
- public void onMapClick(@NonNull LatLng point) {
+ public boolean onMapClick(@NonNull LatLng point) {
if (!onLocationClickListeners.isEmpty() && locationLayerController.onMapClick(point)) {
for (OnLocationClickListener listener : onLocationClickListeners) {
listener.onLocationComponentClick();
}
+ return true;
}
+ return false;
}
};
private MapboxMap.OnMapLongClickListener onMapLongClickListener = new MapboxMap.OnMapLongClickListener() {
@Override
- public void onMapLongClick(@NonNull LatLng point) {
+ public boolean onMapLongClick(@NonNull LatLng point) {
if (!onLocationLongClickListeners.isEmpty() && locationLayerController.onMapClick(point)) {
for (OnLocationLongClickListener listener : onLocationLongClickListeners) {
listener.onLocationComponentLongClick();
}
+ return true;
}
+ return false;
}
};
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
index 711896e45e..d589b2e0e3 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java
@@ -927,7 +927,9 @@ final class MapGestureDetector {
// new API
for (MapboxMap.OnMapClickListener listener : onMapClickListenerList) {
- listener.onMapClick(projection.fromScreenLocation(tapPoint));
+ if (listener.onMapClick(projection.fromScreenLocation(tapPoint))) {
+ return;
+ }
}
}
@@ -939,7 +941,9 @@ final class MapGestureDetector {
// new API
for (MapboxMap.OnMapLongClickListener listener : onMapLongClickListenerList) {
- listener.onMapLongClick(projection.fromScreenLocation(longClickPoint));
+ if (listener.onMapLongClick(projection.fromScreenLocation(longClickPoint))) {
+ return;
+ }
}
}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
index 5296535dd0..f34a30f140 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
@@ -2544,8 +2544,10 @@ public final class MapboxMap {
* Called when the user clicks on the map view.
*
* @param point The projected map coordinate the user clicked on.
+ * @return True if this click should be consumed and not passed further to other listeners registered afterwards,
+ * false otherwise.
*/
- void onMapClick(@NonNull LatLng point);
+ boolean onMapClick(@NonNull LatLng point);
}
/**
@@ -2558,8 +2560,10 @@ public final class MapboxMap {
* Called when the user long clicks on the map view.
*
* @param point The projected map coordinate the user long clicked on.
+ * @return True if this click should be consumed and not passed further to other listeners registered afterwards,
+ * false otherwise.
*/
- void onMapLongClick(@NonNull LatLng point);
+ boolean onMapLongClick(@NonNull LatLng point);
}
/**
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PressForMarkerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PressForMarkerActivity.java
index 67fe05eaa6..62179f151c 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PressForMarkerActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PressForMarkerActivity.java
@@ -43,9 +43,15 @@ public class PressForMarkerActivity extends AppCompatActivity {
mapboxMap = map;
resetMap();
- mapboxMap.addOnMapLongClickListener(point -> addMarker(point));
-
- mapboxMap.addOnMapClickListener(point -> addMarker(point));
+ mapboxMap.addOnMapLongClickListener(point -> {
+ addMarker(point);
+ return false;
+ });
+
+ mapboxMap.addOnMapClickListener(point -> {
+ addMarker(point);
+ return false;
+ });
if (savedInstanceState != null) {
markerList = savedInstanceState.getParcelableArrayList(STATE_MARKER_LIST);
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/CameraPositionActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/CameraPositionActivity.java
index c8ce82f359..b89961b003 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/CameraPositionActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/CameraPositionActivity.java
@@ -64,8 +64,9 @@ public class CameraPositionActivity extends FragmentActivity implements OnMapRea
}
@Override
- public void onMapLongClick(@NonNull LatLng point) {
+ public boolean onMapLongClick(@NonNull LatLng point) {
toggleLogCameraChanges();
+ return false;
}
@Override
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/MaxMinZoomActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/MaxMinZoomActivity.java
index 277eadb1b5..1160fafe61 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/MaxMinZoomActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/camera/MaxMinZoomActivity.java
@@ -35,7 +35,10 @@ public class MaxMinZoomActivity extends AppCompatActivity implements OnMapReadyC
mapboxMap = map;
mapboxMap.setMinZoomPreference(3);
mapboxMap.setMaxZoomPreference(5);
- mapboxMap.setOnMapClickListener(point -> map.setStyle(Style.OUTDOORS, style -> Timber.d("Style Loaded %s", style)));
+ mapboxMap.setOnMapClickListener(point -> {
+ map.setStyle(Style.OUTDOORS, style -> Timber.d("Style Loaded %s", style));
+ return false;
+ });
}
@Override
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java
index be32718dc3..1a4f4e2adb 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QueryRenderedFeaturesPropertiesActivity.java
@@ -71,6 +71,8 @@ public class QueryRenderedFeaturesPropertiesActivity extends AppCompatActivity {
// Add a marker on the clicked point
marker = mapboxMap.addMarker(new CustomMarkerOptions().position(point).features(features));
mapboxMap.selectMarker(marker);
+
+ return false;
});
});
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QuerySourceFeaturesActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QuerySourceFeaturesActivity.java
index 3a52a22f6e..59cad6d816 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QuerySourceFeaturesActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/feature/QuerySourceFeaturesActivity.java
@@ -63,6 +63,8 @@ public class QuerySourceFeaturesActivity extends AppCompatActivity {
List<Feature> features = source.querySourceFeatures(eq(get("key1"), literal("value1")));
Toast.makeText(QuerySourceFeaturesActivity.this, String.format("Found %s features",
features.size()), Toast.LENGTH_SHORT).show();
+
+ return false;
});
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java
index 9dea4f77de..cca87bd0fb 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/DynamicInfoWindowAdapterActivity.java
@@ -71,6 +71,8 @@ public class DynamicInfoWindowAdapterActivity extends AppCompatActivity implemen
infoWindow.update();
});
}
+
+ return false;
});
// Focus on Paris
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/InfoWindowActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/InfoWindowActivity.java
index b8083dfa74..57a1412b55 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/InfoWindowActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/infowindow/InfoWindowActivity.java
@@ -109,7 +109,7 @@ public class InfoWindowActivity extends AppCompatActivity
}
@Override
- public void onMapLongClick(@NonNull LatLng point) {
+ public boolean onMapLongClick(@NonNull LatLng point) {
if (customMarker != null) {
// Remove previous added marker
mapboxMap.removeAnnotation(customMarker);
@@ -122,6 +122,8 @@ public class InfoWindowActivity extends AppCompatActivity
.snippet(new DecimalFormat("#.#####").format(point.getLatitude()) + ", "
+ new DecimalFormat("#.#####").format(point.getLongitude()))
.position(point));
+
+ return false;
}
@Override
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationMapChangeActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationMapChangeActivity.java
index e53604fdd4..5e7548826e 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationMapChangeActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/LocationMapChangeActivity.java
@@ -5,16 +5,15 @@ import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.FloatingActionButton;
import android.support.v7.app.AppCompatActivity;
-import android.view.View;
import android.widget.Toast;
import com.mapbox.android.core.permissions.PermissionsListener;
import com.mapbox.android.core.permissions.PermissionsManager;
+import com.mapbox.mapboxsdk.location.LocationComponent;
+import com.mapbox.mapboxsdk.location.modes.RenderMode;
import com.mapbox.mapboxsdk.maps.MapView;
import com.mapbox.mapboxsdk.maps.MapboxMap;
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
-import com.mapbox.mapboxsdk.location.LocationComponent;
-import com.mapbox.mapboxsdk.location.modes.RenderMode;
import com.mapbox.mapboxsdk.testapp.R;
import java.util.List;
@@ -33,12 +32,9 @@ public class LocationMapChangeActivity extends AppCompatActivity implements OnMa
mapView = findViewById(R.id.mapView);
FloatingActionButton stylesFab = findViewById(R.id.fabStyles);
- stylesFab.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (mapboxMap != null) {
- mapboxMap.setStyleUrl(Utils.getNextStyle());
- }
+ stylesFab.setOnClickListener(v -> {
+ if (mapboxMap != null) {
+ mapboxMap.setStyleUrl(Utils.getNextStyle());
}
});
@@ -86,6 +82,12 @@ public class LocationMapChangeActivity extends AppCompatActivity implements OnMa
locationComponent.activateLocationComponent(this);
locationComponent.setLocationComponentEnabled(true);
locationComponent.setRenderMode(RenderMode.COMPASS);
+
+ locationComponent.addOnLocationClickListener(
+ () -> Toast.makeText(this, "Location clicked", Toast.LENGTH_SHORT).show());
+
+ locationComponent.addOnLocationLongClickListener(
+ () -> Toast.makeText(this, "Location long clicked", Toast.LENGTH_SHORT).show());
}
@Override
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/DoubleMapActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/DoubleMapActivity.java
index 13d0ad4240..6d56305dd2 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/DoubleMapActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/maplayout/DoubleMapActivity.java
@@ -101,6 +101,8 @@ public class DoubleMapActivity extends AppCompatActivity {
// test if we can open 2 activities after each other
Toast.makeText(mapViewMini.getContext(), "Creating a new Activity instance",Toast.LENGTH_SHORT).show();
startActivity(new Intent(mapViewMini.getContext(), DoubleMapActivity.class));
+
+ return false;
});
});
}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/DraggableMarkerActivity.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/DraggableMarkerActivity.kt
index 94282bf7fa..12aa665bee 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/DraggableMarkerActivity.kt
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/DraggableMarkerActivity.kt
@@ -95,6 +95,8 @@ class DraggableMarkerActivity : AppCompatActivity() {
Snackbar.LENGTH_LONG)
.show()
}
+
+ false
}
draggableSymbolsManager = DraggableSymbolsManager(
@@ -185,6 +187,7 @@ class DraggableMarkerActivity : AppCompatActivity() {
onSymbolDragStarted(id)
}
}
+ false
}
androidGesturesManager.setMoveGestureListener(MyMoveGestureListener())
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolGeneratorActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolGeneratorActivity.java
index 61b4eaad1b..1751ccd8c5 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolGeneratorActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolGeneratorActivity.java
@@ -105,6 +105,8 @@ public class SymbolGeneratorActivity extends AppCompatActivity implements OnMapR
"hello from: " + feature.getStringProperty(FEATURE_NAME),
Toast.LENGTH_LONG).show();
}
+
+ return false;
});
}
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java
index cb95176126..727b84a26a 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java
@@ -148,7 +148,7 @@ public class SymbolLayerActivity extends AppCompatActivity implements MapboxMap.
}
@Override
- public void onMapClick(@NonNull LatLng point) {
+ public boolean onMapClick(@NonNull LatLng point) {
// Query which features are clicked
PointF screenLoc = mapboxMap.getProjection().toScreenLocation(point);
List<Feature> features = mapboxMap.queryRenderedFeatures(screenLoc, MARKER_LAYER);
@@ -162,6 +162,8 @@ public class SymbolLayerActivity extends AppCompatActivity implements MapboxMap.
}
geoJsonSource.setGeoJson(markerCollection);
}
+
+ return false;
}
private void toggleTextSize() {
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/ZoomFunctionSymbolLayerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/ZoomFunctionSymbolLayerActivity.java
index 81fd2c6ff8..6ca2122672 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/ZoomFunctionSymbolLayerActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/ZoomFunctionSymbolLayerActivity.java
@@ -125,6 +125,8 @@ public class ZoomFunctionSymbolLayerActivity extends AppCompatActivity {
} else {
Timber.e("No features found");
}
+
+ return false;
});
}