Package 

Class ColorMappingCycle

  • All Implemented Interfaces:
    org.osmdroid.views.overlay.advancedpolyline.ColorMapping

    
    public class ColorMappingCycle
     implements ColorMapping
                        

    Color mapping to cycle through an array of colors.

    • Method Summary

      Modifier and Type Method Description
      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.
      int getColorForIndex(int pSegmentIndex)
      • Methods inherited from class org.osmdroid.views.overlay.advancedpolyline.ColorMapping

        getColorForIndex
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ColorMappingCycle

        ColorMappingCycle(List<Integer> pColors)
      • ColorMappingCycle

        ColorMappingCycle(Array<int> pColors)
    • 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