[android] Generate style code for symbol-sort-key
This commit is contained in:
@@ -110,6 +110,10 @@ public final class Property {
|
||||
|
||||
// SYMBOL_Z_ORDER: Controls the order in which overlapping symbols in the same layer are rendered
|
||||
|
||||
/**
|
||||
* If {@link SYMBOL_SORT_KEY} is set, sort based on that. Otherwise sort symbols by their position relative to the viewport.
|
||||
*/
|
||||
public static final String SYMBOL_Z_ORDER_AUTO = "auto";
|
||||
/**
|
||||
* Symbols will be sorted by their y-position relative to the viewport.
|
||||
*/
|
||||
@@ -123,6 +127,7 @@ public final class Property {
|
||||
* Controls the order in which overlapping symbols in the same layer are rendered
|
||||
*/
|
||||
@StringDef({
|
||||
SYMBOL_Z_ORDER_AUTO,
|
||||
SYMBOL_Z_ORDER_VIEWPORT_Y,
|
||||
SYMBOL_Z_ORDER_SOURCE,
|
||||
})
|
||||
|
||||
@@ -1785,6 +1785,26 @@ public class PropertyFactory {
|
||||
return new LayoutPropertyValue<>("symbol-avoid-edges", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key wehn they overlap. Features with a lower sort key will have priority over other features when doing placement.
|
||||
*
|
||||
* @param value a Float value
|
||||
* @return property wrapper around Float
|
||||
*/
|
||||
public static PropertyValue<Float> symbolSortKey(Float value) {
|
||||
return new LayoutPropertyValue<>("symbol-sort-key", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key wehn they overlap. Features with a lower sort key will have priority over other features when doing placement.
|
||||
*
|
||||
* @param value a Float value
|
||||
* @return property wrapper around Float
|
||||
*/
|
||||
public static PropertyValue<Expression> symbolSortKey(Expression value) {
|
||||
return new LayoutPropertyValue<>("symbol-sort-key", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls the order in which overlapping symbols in the same layer are rendered
|
||||
*
|
||||
|
||||
@@ -181,6 +181,18 @@ public class SymbolLayer extends Layer {
|
||||
return (PropertyValue<Boolean>) new PropertyValue("symbol-avoid-edges", nativeGetSymbolAvoidEdges());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SymbolSortKey property
|
||||
*
|
||||
* @return property wrapper value around Float
|
||||
*/
|
||||
@NonNull
|
||||
@SuppressWarnings("unchecked")
|
||||
public PropertyValue<Float> getSymbolSortKey() {
|
||||
checkThread();
|
||||
return (PropertyValue<Float>) new PropertyValue("symbol-sort-key", nativeGetSymbolSortKey());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SymbolZOrder property
|
||||
*
|
||||
@@ -1113,6 +1125,10 @@ public class SymbolLayer extends Layer {
|
||||
@Keep
|
||||
private native Object nativeGetSymbolAvoidEdges();
|
||||
|
||||
@NonNull
|
||||
@Keep
|
||||
private native Object nativeGetSymbolSortKey();
|
||||
|
||||
@NonNull
|
||||
@Keep
|
||||
private native Object nativeGetSymbolZOrder();
|
||||
|
||||
Reference in New Issue
Block a user