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

Fix code generation #10856

Merged
merged 1 commit into from
Jan 9, 2018
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
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
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
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;

/**
* An extruded (3D) polygon.
*
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 polygon with an optional stroked border.
*
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 stroked line.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

package com.mapbox.mapboxsdk.style.layers;

import android.annotation.SuppressLint;
import android.support.annotation.ColorInt;

import com.mapbox.mapboxsdk.style.functions.CameraFunction;
Expand Down Expand Up @@ -1536,7 +1535,6 @@ public static PropertyValue<Expression> fillExtrusionOpacity(Expression expressi
return new PaintPropertyValue<>("fill-extrusion-opacity", expression);
}


/**
* The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.
*
Expand Down Expand Up @@ -3365,6 +3363,7 @@ public static PropertyValue<Expression> textOptional(Expression value) {
return new LayoutPropertyValue<>("text-optional", value);
}


/**
* If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

package com.mapbox.mapboxsdk.style.layers;

import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.support.annotation.UiThread;

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

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

/**
* Raster map textures such as satellite imagery.
*
Expand Down Expand Up @@ -245,24 +250,6 @@ public PropertyValue<Float> getRasterFadeDuration() {
return (PropertyValue<Float>) new PropertyValue("raster-fade-duration", nativeGetRasterFadeDuration());
}

/**
* Get the RasterFadeDuration property transition options
*
* @return transition options for Float
*/
public TransitionOptions getRasterFadeDurationTransition() {
return nativeGetRasterFadeDurationTransition();
}

/**
* Set the RasterFadeDuration property transition options
*
* @param options transition options for Float
*/
public void setRasterFadeDurationTransition(TransitionOptions options) {
nativeSetRasterFadeDurationTransition(options.getDuration(), options.getDelay());
}

private native Object nativeGetRasterOpacity();

private native TransitionOptions nativeGetRasterOpacityTransition();
Expand Down Expand Up @@ -301,10 +288,6 @@ public void setRasterFadeDurationTransition(TransitionOptions options) {

private native Object nativeGetRasterFadeDuration();

private native TransitionOptions nativeGetRasterFadeDurationTransition();

private native void nativeSetRasterFadeDurationTransition(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;

/**
* An icon or a text label.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

package com.mapbox.mapboxsdk.style.layers;

import android.annotation.SuppressLint;
import android.support.annotation.ColorInt;

import com.mapbox.mapboxsdk.style.functions.Function;
import com.mapbox.mapboxsdk.style.functions.CameraFunction;
import com.mapbox.mapboxsdk.style.expressions.Expression;
import com.mapbox.mapboxsdk.style.functions.Function;

import java.util.Locale;

/**
* Constructs paint/layout properties for Layers
Expand Down Expand Up @@ -154,9 +155,9 @@ public class PropertyFactory {

<% } -%>
<% } -%>
@SuppressLint("DefaultLocale")
public static String colorToRgbaString(@ColorInt int value) {
return String.format("rgba(%d, %d, %d, %d)", (value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, (value >> 24) & 0xFF);
return String.format(Locale.US,"rgba(%d, %d, %d, %d)",
(value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, (value >> 24) & 0xFF);
}

}
Loading