Minor updates.

This commit is contained in:
Bartlomiej Niechwiej
2010-10-22 10:00:15 -07:00
parent b70e001206
commit a3793aa92b
2 changed files with 4 additions and 1 deletions
@@ -295,11 +295,14 @@ public class MyTracksOverlay extends Overlay {
} else {
int numPoints = points.size();
if (numPoints < 2) {
// Not enough points to draw a path.
path = null;
} else if (lastPath != null && !newProjection) {
// Incremental update of the path, without repositioning the view.
path = lastPath;
updatePath(projection, viewRect, path, numPoints - newPoints);
} else {
// The view has changed so we have to start from scratch.
path = newPath();
path.incReserve(numPoints);
updatePath(projection, viewRect, path, 0);
@@ -98,7 +98,7 @@ public class MyTracksOverlayTest extends AndroidTestCase {
/**
* A mock {@code Projection} that acts as the identity matrix.
*/
private static class MockProjection implements Projection {
private static class MockProjection implements Projection {
@Override
public Point toPixels(GeoPoint in, Point out) {
return out;