summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2019-04-11 12:35:20 +0200
committerTobrun <tobrun.van.nuland@gmail.com>2019-04-12 16:21:47 +0200
commit1186f5b50b137ad2ecbda13f3edb0314c96d6a36 (patch)
treec28ee3e57823373828b413a326e21ee54b5df0fc
parent495517ce288ecb743716b14a1c6b63cadac9c7f9 (diff)
downloadqtlocation-mapboxgl-1186f5b50b137ad2ecbda13f3edb0314c96d6a36.tar.gz
[android] - add javadoc indicating that query methods can return empty depending on map/surface state
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java21
1 files changed, 15 insertions, 6 deletions
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 ebfac5a021..f84d028e1d 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
@@ -12,7 +12,6 @@ import android.support.annotation.Size;
import android.support.annotation.UiThread;
import android.text.TextUtils;
import android.view.View;
-
import com.mapbox.android.gestures.AndroidGesturesManager;
import com.mapbox.android.gestures.MoveGestureDetector;
import com.mapbox.android.gestures.RotateGestureDetector;
@@ -1871,20 +1870,25 @@ public final class MapboxMap {
}
/**
- * Queries the map for rendered features
+ * Queries the map for rendered features.
+ * <p>
+ * Returns an empty list if either the map or underlying render surface has been destroyed.
+ * </p>
*
* @param coordinates the point to query
* @param layerIds optionally - only query these layers
* @return the list of feature
*/
@NonNull
- public List<Feature> queryRenderedFeatures(@NonNull PointF coordinates, @Nullable String...
- layerIds) {
+ public List<Feature> queryRenderedFeatures(@NonNull PointF coordinates, @Nullable String... layerIds) {
return nativeMapView.queryRenderedFeatures(coordinates, layerIds, null);
}
/**
* Queries the map for rendered features
+ * <p>
+ * Returns an empty list if either the map or underlying render surface has been destroyed.
+ * </p>
*
* @param coordinates the point to query
* @param filter filters the returned features with an expression
@@ -1900,19 +1904,24 @@ public final class MapboxMap {
/**
* Queries the map for rendered features
+ * <p>
+ * Returns an empty list if either the map or underlying render surface has been destroyed.
+ * </p>
*
* @param coordinates the box to query
* @param layerIds optionally - only query these layers
* @return the list of feature
*/
@NonNull
- public List<Feature> queryRenderedFeatures(@NonNull RectF coordinates,
- @Nullable String... layerIds) {
+ public List<Feature> queryRenderedFeatures(@NonNull RectF coordinates, @Nullable String... layerIds) {
return nativeMapView.queryRenderedFeatures(coordinates, layerIds, null);
}
/**
* Queries the map for rendered features
+ * <p>
+ * Returns an empty list if either the map or underlying render surface has been destroyed.
+ * </p>
*
* @param coordinates the box to query
* @param filter filters the returned features with an expression