Converted PoathOverlay into an imutable object
Change-Id: I4c2aebe2a734560e4178e0ef789de815927afada Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
Binary file not shown.
@@ -17,18 +17,18 @@ import com.google.android.maps.Overlay;
|
|||||||
import com.google.android.maps.Projection;
|
import com.google.android.maps.Projection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This overlay class is used to draw a path and points on a map
|
* This imutable overlay class is used to draw a path and points on a map
|
||||||
* @author ricky barrette
|
* @author ricky barrette
|
||||||
*/
|
*/
|
||||||
public class PathOverlay extends Overlay {
|
public final class PathOverlay extends Overlay {
|
||||||
|
|
||||||
private static final int PATH = 0;
|
private static final int PATH = 0;
|
||||||
private static final int POINT = 1;
|
private static final int POINT = 1;
|
||||||
private GeoPoint mStart;
|
private final GeoPoint mStart;
|
||||||
private GeoPoint mEnd;
|
private final GeoPoint mEnd;
|
||||||
private int mColor;
|
private final int mColor;
|
||||||
private int mMode;
|
private final int mMode;
|
||||||
private int mRadius;
|
private final int mRadius;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new PathOverlay in path mode
|
* Creates a new PathOverlay in path mode
|
||||||
@@ -39,6 +39,7 @@ public class PathOverlay extends Overlay {
|
|||||||
mEnd = end;
|
mEnd = end;
|
||||||
mColor = color;
|
mColor = color;
|
||||||
mMode = PATH;
|
mMode = PATH;
|
||||||
|
mRadius = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,6 +53,8 @@ public class PathOverlay extends Overlay {
|
|||||||
mMode = POINT;
|
mMode = POINT;
|
||||||
mRadius = radius;
|
mRadius = radius;
|
||||||
mStart = point;
|
mStart = point;
|
||||||
|
mEnd = null;
|
||||||
|
mColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user