Class PathLayer

java.lang.Object
org.oscim.layers.Layer
org.oscim.layers.PathLayer
All Implemented Interfaces:
GestureListener

public class PathLayer extends Layer implements GestureListener
This class draws a path line in given color or texture.
  • Field Details

    • mPoints

      protected final ArrayList<GeoPoint> mPoints
      Stores points, converted to the map projection.
    • mUpdatePoints

      protected boolean mUpdatePoints
  • Constructor Details

    • PathLayer

      public PathLayer(Map map, LineStyle style)
    • PathLayer

      public PathLayer(Map map, int lineColor, float lineWidth)
    • PathLayer

      public PathLayer(Map map, int lineColor)
  • Method Details

    • setStyle

      public void setStyle(LineStyle style)
    • clearPath

      public void clearPath()
    • setPoints

      public void setPoints(Collection<? extends GeoPoint> pts)
    • addPoint

      public void addPoint(GeoPoint pt)
    • addPoint

      public void addPoint(int latitudeE6, int longitudeE6)
    • addPoints

      public void addPoints(Collection<? extends GeoPoint> pts)
    • getPoints

      public List<GeoPoint> getPoints()
    • setGeom

      public void setGeom(GeometryBuffer geom)
      Deprecated.
      FIXME To be removed
    • addGreatCircle

      public void addGreatCircle(GeoPoint startPoint, GeoPoint endPoint)
      Draw a great circle. Calculate a point for every 100km along the path.
      Parameters:
      startPoint - start point of the great circle
      endPoint - end point of the great circle
    • addGreatCircle

      public void addGreatCircle(GeoPoint startPoint, GeoPoint endPoint, int numberOfPoints)
      Draw a great circle.
      Parameters:
      startPoint - start point of the great circle
      endPoint - end point of the great circle
      numberOfPoints - number of points to calculate along the path
    • contains

      public boolean contains(float x, float y)
    • onGesture

      public boolean onGesture(Gesture g, MotionEvent e)
      Specified by:
      onGesture in interface GestureListener