[android] #5978 - fix number property filters [ci skip]
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mapbox.mapboxsdk.style.layers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* Utility to build filter expressions more easily:
|
||||
@@ -36,7 +37,7 @@ public class Filter {
|
||||
ArrayList<Object> array = new ArrayList<>(2 + values.length);
|
||||
array.add(operator);
|
||||
array.add(key);
|
||||
array.addAll(Arrays.asList(values));
|
||||
Collections.addAll(array, values);
|
||||
return array.toArray();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,11 @@ public class Function<T> {
|
||||
Object[] toValueObject() {
|
||||
return new Object[]{in, out};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("[%s, %s]", in, out);
|
||||
}
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
|
||||
@@ -26,11 +26,12 @@ public abstract class Layer {
|
||||
|
||||
boolean updateClasses = false;
|
||||
for (Property<?> property : properties) {
|
||||
Object converted = convertValue(property.value);
|
||||
if (property instanceof PaintProperty) {
|
||||
updateClasses = true;
|
||||
nativeSetPaintProperty(property.name, convertValue(property.value));
|
||||
nativeSetPaintProperty(property.name, converted);
|
||||
} else {
|
||||
nativeSetLayoutProperty(property.name, convertValue(property.value));
|
||||
nativeSetLayoutProperty(property.name, converted);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user