-
- All Implemented Interfaces:
-
org.osmdroid.views.overlay.advancedpolyline.ColorMapping
public class ColorMappingCycle implements ColorMapping
Color mapping to cycle through an array of colors.
-
-
Constructor Summary
Constructors Constructor Description ColorMappingCycle(List<Integer> pColors)ColorMappingCycle(Array<int> pColors)
-
Method Summary
Modifier and Type Method Description voidsetGeoPointNumber(int pGeoPointNumber)Ignore most of the time.Only useful if you display a closed polyline with gradients:* when displaying a segment with a gradient,you compute the gradient from the current segment's color to the next segment's color* in the closing segment case, we compute normally the color of the last segment,but we also need to know the color of the next segment, which is the very first segmentThat's why we need to know the number of segments.Without that information, we would just give the next color of the cycle. intgetColorForIndex(int pSegmentIndex)-
-
Method Detail
-
setGeoPointNumber
void setGeoPointNumber(int pGeoPointNumber)
Ignore most of the time.Only useful if you display a closed polyline with gradients:* when displaying a segment with a gradient,you compute the gradient from the current segment's color to the next segment's color* in the closing segment case, we compute normally the color of the last segment,but we also need to know the color of the next segment, which is the very first segmentThat's why we need to know the number of segments.Without that information, we would just give the next color of the cycle.
- Parameters:
pGeoPointNumber- Number of GeoPoints of the polyline
-
getColorForIndex
int getColorForIndex(int pSegmentIndex)
-
-
-
-