summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Property.java21
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java20
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/RasterLayer.java13
3 files changed, 54 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Property.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Property.java
index e52474c35b..c264d773c5 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Property.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Property.java
@@ -570,6 +570,27 @@ public final class Property {
@Retention(RetentionPolicy.SOURCE)
public @interface FILL_EXTRUSION_TRANSLATE_ANCHOR {}
+ // RASTER_RESAMPLING: The resampling/interpolation method to use for overscaling, also known as texture magnification filter
+
+ /**
+ * (Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled
+ */
+ public static final String RASTER_RESAMPLING_LINEAR = "linear";
+ /**
+ * Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled
+ */
+ public static final String RASTER_RESAMPLING_NEAREST = "nearest";
+
+ /**
+ * The resampling/interpolation method to use for overscaling, also known as texture magnification filter
+ */
+ @StringDef({
+ RASTER_RESAMPLING_LINEAR,
+ RASTER_RESAMPLING_NEAREST,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface RASTER_RESAMPLING {}
+
// HILLSHADE_ILLUMINATION_ANCHOR: Direction of light source when map is rotated.
/**
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java
index 57638920be..5338fb84f6 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java
@@ -1336,6 +1336,26 @@ public class PropertyFactory {
}
/**
+ * The resampling/interpolation method to use for overscaling, also known as texture magnification filter
+ *
+ * @param value a String value
+ * @return property wrapper around String
+ */
+ public static PropertyValue<String> rasterResampling(@Property.RASTER_RESAMPLING String value) {
+ return new PaintPropertyValue<>("raster-resampling", value);
+ }
+
+ /**
+ * The resampling/interpolation method to use for overscaling, also known as texture magnification filter
+ *
+ * @param expression an expression statement
+ * @return property wrapper around an expression statement
+ */
+ public static PropertyValue<Expression> rasterResampling(Expression expression) {
+ return new PaintPropertyValue<>("raster-resampling", expression);
+ }
+
+ /**
* Fade duration when a new tile is added.
*
* @param value a Float value
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/RasterLayer.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/RasterLayer.java
index 218ed36744..1214f7b11c 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/RasterLayer.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/RasterLayer.java
@@ -264,6 +264,17 @@ public class RasterLayer extends Layer {
}
/**
+ * Get the RasterResampling property
+ *
+ * @return property wrapper value around String
+ */
+ @SuppressWarnings("unchecked")
+ public PropertyValue<String> getRasterResampling() {
+ checkThread();
+ return (PropertyValue<String>) new PropertyValue("raster-resampling", nativeGetRasterResampling());
+ }
+
+ /**
* Get the RasterFadeDuration property
*
* @return property wrapper value around Float
@@ -310,6 +321,8 @@ public class RasterLayer extends Layer {
private native void nativeSetRasterContrastTransition(long duration, long delay);
+ private native Object nativeGetRasterResampling();
+
private native Object nativeGetRasterFadeDuration();
@Override