Package com.google.maps.android.heatmaps
Class Gradient
- java.lang.Object
-
- com.google.maps.android.heatmaps.Gradient
-
public class Gradient extends java.lang.ObjectA class to generate a color map from a given array of colors and the fractions that the colors represent by interpolating between their HSV values. This color map is to be used in the HeatmapTileProvider.
-
-
Field Summary
Fields Modifier and Type Field Description intmColorMapSizeSize of a color map for the heatmapint[]mColorsThe colors to be used in the gradientfloat[]mStartPointsThe starting point for each color, given as a percentage of the maximum intensity
-
Constructor Summary
Constructors Constructor Description Gradient(int[] colors, float[] startPoints)Creates a Gradient with the given colors and starting points.Gradient(int[] colors, float[] startPoints, int colorMapSize)Creates a Gradient with the given colors and starting points which creates a colorMap of given size.
-
-
-
Constructor Detail
-
Gradient
public Gradient(int[] colors, float[] startPoints)Creates a Gradient with the given colors and starting points. These are given as parallel arrays.- Parameters:
colors- The colors to be used in the gradientstartPoints- The starting point for each color, given as a percentage of the maximum intensity This is given as an array of floats with values in the interval [0,1]
-
Gradient
public Gradient(int[] colors, float[] startPoints, int colorMapSize)Creates a Gradient with the given colors and starting points which creates a colorMap of given size. The colors and starting points are given as parallel arrays.- Parameters:
colors- The colors to be used in the gradientstartPoints- The starting point for each color, given as a percentage of the maximum intensity This is given as an array of floats with values in the interval [0,1]colorMapSize- The size of the colorMap to be generated by the Gradient
-
-