Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[android] - transition options for layer properties #8509

Merged
merged 1 commit into from
Mar 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions platform/android/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Mapbox welcomes participation and contributions from everyone. If you'd like to

5.1.0 builds further on 5.0.1 and adds:

* Transition Properties for Layer attributes [#8509](https://github.com/mapbox/mapbox-gl-native/pull/8509)
* Style wide transition duration and transition offset in milliseconds [#8576](https://github.com/mapbox/mapbox-gl-native/pull/8576)
* Transifex integration, Catalan & Dutch translations [#8556](https://github.com/mapbox/mapbox-gl-native/pull/8556)
* LatLngBounds includes with another bounds [#8517](https://github.com/mapbox/mapbox-gl-native/pull/8517)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;

import com.mapbox.mapboxsdk.style.layers.TransitionOptions;

/**
* The background color or pattern of the map.
*
Expand Down Expand Up @@ -75,6 +77,23 @@ public int getBackgroundColorAsInt() {
}
}

/**
* Get the BackgroundColor property transition options
*
* @return transition options for String
*/
public TransitionOptions getBackgroundColorTransition() {
return nativeGetBackgroundColorTransition();
}

/**
* Set the BackgroundColor property transition options
*
* @param options transition options for String
*/
public void setBackgroundColorTransition(TransitionOptions options) {
nativeSetBackgroundColorTransition(options.getDuration(), options.getDelay());
}

/**
* Get the BackgroundPattern property
Expand All @@ -86,6 +105,24 @@ public PropertyValue<String> getBackgroundPattern() {
return (PropertyValue<String>) new PropertyValue("background-pattern", nativeGetBackgroundPattern());
}

/**
* Get the BackgroundPattern property transition options
*
* @return transition options for String
*/
public TransitionOptions getBackgroundPatternTransition() {
return nativeGetBackgroundPatternTransition();
}

/**
* Set the BackgroundPattern property transition options
*
* @param options transition options for String
*/
public void setBackgroundPatternTransition(TransitionOptions options) {
nativeSetBackgroundPatternTransition(options.getDuration(), options.getDelay());
}

/**
* Get the BackgroundOpacity property
*
Expand All @@ -96,12 +133,41 @@ public PropertyValue<Float> getBackgroundOpacity() {
return (PropertyValue<Float>) new PropertyValue("background-opacity", nativeGetBackgroundOpacity());
}

/**
* Get the BackgroundOpacity property transition options
*
* @return transition options for Float
*/
public TransitionOptions getBackgroundOpacityTransition() {
return nativeGetBackgroundOpacityTransition();
}

/**
* Set the BackgroundOpacity property transition options
*
* @param options transition options for Float
*/
public void setBackgroundOpacityTransition(TransitionOptions options) {
nativeSetBackgroundOpacityTransition(options.getDuration(), options.getDelay());
}

private native Object nativeGetBackgroundColor();

private native TransitionOptions nativeGetBackgroundColorTransition();

private native void nativeSetBackgroundColorTransition(long duration, long delay);

private native Object nativeGetBackgroundPattern();

private native TransitionOptions nativeGetBackgroundPatternTransition();

private native void nativeSetBackgroundPatternTransition(long duration, long delay);

private native Object nativeGetBackgroundOpacity();

private native TransitionOptions nativeGetBackgroundOpacityTransition();

private native void nativeSetBackgroundOpacityTransition(long duration, long delay);

@Override
protected native void finalize() throws Throwable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import static com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor;

import com.mapbox.mapboxsdk.style.layers.TransitionOptions;

/**
* A filled circle.
*
Expand Down Expand Up @@ -100,6 +102,24 @@ public PropertyValue<Float> getCircleRadius() {
return (PropertyValue<Float>) new PropertyValue("circle-radius", nativeGetCircleRadius());
}

/**
* Get the CircleRadius property transition options
*
* @return transition options for Float
*/
public TransitionOptions getCircleRadiusTransition() {
return nativeGetCircleRadiusTransition();
}

/**
* Set the CircleRadius property transition options
*
* @param options transition options for Float
*/
public void setCircleRadiusTransition(TransitionOptions options) {
nativeSetCircleRadiusTransition(options.getDuration(), options.getDelay());
}

/**
* Get the CircleColor property
*
Expand All @@ -126,6 +146,23 @@ public int getCircleColorAsInt() {
}
}

/**
* Get the CircleColor property transition options
*
* @return transition options for String
*/
public TransitionOptions getCircleColorTransition() {
return nativeGetCircleColorTransition();
}

/**
* Set the CircleColor property transition options
*
* @param options transition options for String
*/
public void setCircleColorTransition(TransitionOptions options) {
nativeSetCircleColorTransition(options.getDuration(), options.getDelay());
}

/**
* Get the CircleBlur property
Expand All @@ -137,6 +174,24 @@ public PropertyValue<Float> getCircleBlur() {
return (PropertyValue<Float>) new PropertyValue("circle-blur", nativeGetCircleBlur());
}

/**
* Get the CircleBlur property transition options
*
* @return transition options for Float
*/
public TransitionOptions getCircleBlurTransition() {
return nativeGetCircleBlurTransition();
}

/**
* Set the CircleBlur property transition options
*
* @param options transition options for Float
*/
public void setCircleBlurTransition(TransitionOptions options) {
nativeSetCircleBlurTransition(options.getDuration(), options.getDelay());
}

/**
* Get the CircleOpacity property
*
Expand All @@ -147,6 +202,24 @@ public PropertyValue<Float> getCircleOpacity() {
return (PropertyValue<Float>) new PropertyValue("circle-opacity", nativeGetCircleOpacity());
}

/**
* Get the CircleOpacity property transition options
*
* @return transition options for Float
*/
public TransitionOptions getCircleOpacityTransition() {
return nativeGetCircleOpacityTransition();
}

/**
* Set the CircleOpacity property transition options
*
* @param options transition options for Float
*/
public void setCircleOpacityTransition(TransitionOptions options) {
nativeSetCircleOpacityTransition(options.getDuration(), options.getDelay());
}

/**
* Get the CircleTranslate property
*
Expand All @@ -157,6 +230,24 @@ public PropertyValue<Float[]> getCircleTranslate() {
return (PropertyValue<Float[]>) new PropertyValue("circle-translate", nativeGetCircleTranslate());
}

/**
* Get the CircleTranslate property transition options
*
* @return transition options for Float[]
*/
public TransitionOptions getCircleTranslateTransition() {
return nativeGetCircleTranslateTransition();
}

/**
* Set the CircleTranslate property transition options
*
* @param options transition options for Float[]
*/
public void setCircleTranslateTransition(TransitionOptions options) {
nativeSetCircleTranslateTransition(options.getDuration(), options.getDelay());
}

/**
* Get the CircleTranslateAnchor property
*
Expand Down Expand Up @@ -187,6 +278,24 @@ public PropertyValue<Float> getCircleStrokeWidth() {
return (PropertyValue<Float>) new PropertyValue("circle-stroke-width", nativeGetCircleStrokeWidth());
}

/**
* Get the CircleStrokeWidth property transition options
*
* @return transition options for Float
*/
public TransitionOptions getCircleStrokeWidthTransition() {
return nativeGetCircleStrokeWidthTransition();
}

/**
* Set the CircleStrokeWidth property transition options
*
* @param options transition options for Float
*/
public void setCircleStrokeWidthTransition(TransitionOptions options) {
nativeSetCircleStrokeWidthTransition(options.getDuration(), options.getDelay());
}

/**
* Get the CircleStrokeColor property
*
Expand All @@ -213,6 +322,23 @@ public int getCircleStrokeColorAsInt() {
}
}

/**
* Get the CircleStrokeColor property transition options
*
* @return transition options for String
*/
public TransitionOptions getCircleStrokeColorTransition() {
return nativeGetCircleStrokeColorTransition();
}

/**
* Set the CircleStrokeColor property transition options
*
* @param options transition options for String
*/
public void setCircleStrokeColorTransition(TransitionOptions options) {
nativeSetCircleStrokeColorTransition(options.getDuration(), options.getDelay());
}

/**
* Get the CircleStrokeOpacity property
Expand All @@ -224,26 +350,75 @@ public PropertyValue<Float> getCircleStrokeOpacity() {
return (PropertyValue<Float>) new PropertyValue("circle-stroke-opacity", nativeGetCircleStrokeOpacity());
}

/**
* Get the CircleStrokeOpacity property transition options
*
* @return transition options for Float
*/
public TransitionOptions getCircleStrokeOpacityTransition() {
return nativeGetCircleStrokeOpacityTransition();
}

/**
* Set the CircleStrokeOpacity property transition options
*
* @param options transition options for Float
*/
public void setCircleStrokeOpacityTransition(TransitionOptions options) {
nativeSetCircleStrokeOpacityTransition(options.getDuration(), options.getDelay());
}

private native Object nativeGetCircleRadius();

private native TransitionOptions nativeGetCircleRadiusTransition();

private native void nativeSetCircleRadiusTransition(long duration, long delay);

private native Object nativeGetCircleColor();

private native TransitionOptions nativeGetCircleColorTransition();

private native void nativeSetCircleColorTransition(long duration, long delay);

private native Object nativeGetCircleBlur();

private native TransitionOptions nativeGetCircleBlurTransition();

private native void nativeSetCircleBlurTransition(long duration, long delay);

private native Object nativeGetCircleOpacity();

private native TransitionOptions nativeGetCircleOpacityTransition();

private native void nativeSetCircleOpacityTransition(long duration, long delay);

private native Object nativeGetCircleTranslate();

private native TransitionOptions nativeGetCircleTranslateTransition();

private native void nativeSetCircleTranslateTransition(long duration, long delay);

private native Object nativeGetCircleTranslateAnchor();

private native Object nativeGetCirclePitchScale();

private native Object nativeGetCircleStrokeWidth();

private native TransitionOptions nativeGetCircleStrokeWidthTransition();

private native void nativeSetCircleStrokeWidthTransition(long duration, long delay);

private native Object nativeGetCircleStrokeColor();

private native TransitionOptions nativeGetCircleStrokeColorTransition();

private native void nativeSetCircleStrokeColorTransition(long duration, long delay);

private native Object nativeGetCircleStrokeOpacity();

private native TransitionOptions nativeGetCircleStrokeOpacityTransition();

private native void nativeSetCircleStrokeOpacityTransition(long duration, long delay);

@Override
protected native void finalize() throws Throwable;
Expand Down
Loading