Update generate-style-code and add sort key api for LineLayer and FillLayer. (#209)
This commit is contained in:
@@ -10,6 +10,11 @@ import androidx.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* The background color or pattern of the map.
|
||||
*
|
||||
|
||||
@@ -10,8 +10,10 @@ import androidx.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* A filled circle.
|
||||
|
||||
@@ -10,8 +10,10 @@ import androidx.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* An extruded (3D) polygon.
|
||||
|
||||
@@ -10,8 +10,10 @@ import androidx.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* A filled polygon with an optional stroked border.
|
||||
@@ -141,6 +143,18 @@ public class FillLayer extends Layer {
|
||||
|
||||
// Property getters
|
||||
|
||||
/**
|
||||
* Get the FillSortKey property
|
||||
*
|
||||
* @return property wrapper value around Float
|
||||
*/
|
||||
@NonNull
|
||||
@SuppressWarnings("unchecked")
|
||||
public PropertyValue<Float> getFillSortKey() {
|
||||
checkThread();
|
||||
return (PropertyValue<Float>) new PropertyValue("fill-sort-key", nativeGetFillSortKey());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the FillAntialias property
|
||||
*
|
||||
@@ -364,6 +378,10 @@ public class FillLayer extends Layer {
|
||||
nativeSetFillPatternTransition(options.getDuration(), options.getDelay());
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Keep
|
||||
private native Object nativeGetFillSortKey();
|
||||
|
||||
@NonNull
|
||||
@Keep
|
||||
private native Object nativeGetFillAntialias();
|
||||
|
||||
@@ -10,8 +10,10 @@ import androidx.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* A heatmap.
|
||||
|
||||
@@ -10,6 +10,11 @@ import androidx.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.
|
||||
*
|
||||
|
||||
@@ -10,8 +10,10 @@ import androidx.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* A stroked line.
|
||||
@@ -189,6 +191,18 @@ public class LineLayer extends Layer {
|
||||
return (PropertyValue<Float>) new PropertyValue("line-round-limit", nativeGetLineRoundLimit());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the LineSortKey property
|
||||
*
|
||||
* @return property wrapper value around Float
|
||||
*/
|
||||
@NonNull
|
||||
@SuppressWarnings("unchecked")
|
||||
public PropertyValue<Float> getLineSortKey() {
|
||||
checkThread();
|
||||
return (PropertyValue<Float>) new PropertyValue("line-sort-key", nativeGetLineSortKey());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the LineOpacity property
|
||||
*
|
||||
@@ -560,6 +574,10 @@ public class LineLayer extends Layer {
|
||||
@Keep
|
||||
private native Object nativeGetLineRoundLimit();
|
||||
|
||||
@NonNull
|
||||
@Keep
|
||||
private native Object nativeGetLineSortKey();
|
||||
|
||||
@NonNull
|
||||
@Keep
|
||||
private native Object nativeGetLineOpacity();
|
||||
|
||||
@@ -1645,6 +1645,26 @@ public class PropertyFactory {
|
||||
return new PaintPropertyValue<>("background-opacity", expression);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
|
||||
*
|
||||
* @param value a Float value
|
||||
* @return property wrapper around Float
|
||||
*/
|
||||
public static PropertyValue<Float> fillSortKey(Float value) {
|
||||
return new LayoutPropertyValue<>("fill-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.
|
||||
*
|
||||
* @param value a Float value
|
||||
* @return property wrapper around Float
|
||||
*/
|
||||
public static PropertyValue<Expression> fillSortKey(Expression value) {
|
||||
return new LayoutPropertyValue<>("fill-sort-key", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The display of line endings.
|
||||
*
|
||||
@@ -1725,6 +1745,26 @@ public class PropertyFactory {
|
||||
return new LayoutPropertyValue<>("line-round-limit", 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.
|
||||
*
|
||||
* @param value a Float value
|
||||
* @return property wrapper around Float
|
||||
*/
|
||||
public static PropertyValue<Float> lineSortKey(Float value) {
|
||||
return new LayoutPropertyValue<>("line-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.
|
||||
*
|
||||
* @param value a Float value
|
||||
* @return property wrapper around Float
|
||||
*/
|
||||
public static PropertyValue<Expression> lineSortKey(Expression value) {
|
||||
return new LayoutPropertyValue<>("line-sort-key", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Label placement relative to its geometry.
|
||||
*
|
||||
@@ -1766,7 +1806,7 @@ public class PropertyFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.
|
||||
* If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.
|
||||
*
|
||||
* @param value a Boolean value
|
||||
* @return property wrapper around Boolean
|
||||
@@ -1776,7 +1816,7 @@ public class PropertyFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.
|
||||
* If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.
|
||||
*
|
||||
* @param value a Boolean value
|
||||
* @return property wrapper around Boolean
|
||||
@@ -2316,7 +2356,7 @@ public class PropertyFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* To increase the chance of placing high-priority labels on the map, you can provide an array of {@link Property.TEXT_ANCHOR} locations: the render will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the {@link PropertyFactory#textRadialOffset} or the two-dimensional {@link PropertyFactory#textOffset}.
|
||||
* To increase the chance of placing high-priority labels on the map, you can provide an array of {@link Property.TEXT_ANCHOR} locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the {@link PropertyFactory#textRadialOffset} or the two-dimensional {@link PropertyFactory#textOffset}.
|
||||
*
|
||||
* @param value a String[] value
|
||||
* @return property wrapper around String[]
|
||||
@@ -2326,7 +2366,7 @@ public class PropertyFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* To increase the chance of placing high-priority labels on the map, you can provide an array of {@link Property.TEXT_ANCHOR} locations: the render will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the {@link PropertyFactory#textRadialOffset} or the two-dimensional {@link PropertyFactory#textOffset}.
|
||||
* To increase the chance of placing high-priority labels on the map, you can provide an array of {@link Property.TEXT_ANCHOR} locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the {@link PropertyFactory#textRadialOffset} or the two-dimensional {@link PropertyFactory#textOffset}.
|
||||
*
|
||||
* @param value a String[] value
|
||||
* @return property wrapper around String[]
|
||||
|
||||
@@ -8,6 +8,13 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
/**
|
||||
* Raster map textures such as satellite imagery.
|
||||
*
|
||||
|
||||
@@ -10,9 +10,12 @@ import androidx.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
import com.mapbox.mapboxsdk.style.types.Formatted;
|
||||
import com.mapbox.mapboxsdk.style.types.FormattedSection;
|
||||
|
||||
/**
|
||||
* An icon or a text label.
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
package com.mapbox.mapboxsdk.style.layers;
|
||||
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.Keep;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.UiThread;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.UiThread;
|
||||
|
||||
import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
package com.mapbox.mapboxsdk.style.layers;
|
||||
|
||||
import android.support.annotation.StringDef;
|
||||
import androidx.annotation.StringDef;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
package com.mapbox.mapboxsdk.style.layers;
|
||||
|
||||
import android.support.annotation.ColorInt;
|
||||
import androidx.annotation.ColorInt;
|
||||
|
||||
import com.mapbox.mapboxsdk.style.expressions.Expression;
|
||||
import com.mapbox.mapboxsdk.style.types.Formatted;
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
package com.mapbox.mapboxsdk.style.light;
|
||||
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.Keep;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.UiThread;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.UiThread;
|
||||
|
||||
import com.mapbox.mapboxsdk.style.layers.Property;
|
||||
import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
|
||||
|
||||
Reference in New Issue
Block a user