background(0);
map.draw();
noStroke();
fill(0, 0, 255);
ScreenPosition sourcePos = map.getScreenPosition(targetLocation);
ellipse(sourcePos.x, sourcePos.y, 10, 10);
fill(255, 0, 0);
ScreenPosition targetPos = map.getScreenPosition(sourceLocation);
ellipse(targetPos.x, targetPos.y, 10, 10);
double bearing = GeoUtils.getAngleBetween(targetLocation, sourceLocation);
double dist = GeoUtils.getDistance(targetLocation, sourceLocation);
noFill();
strokeWeight(4);
stroke(0, 100);
beginShape();
for (float d = 0; d < dist; d += 100) {
Location tweenLocation = GeoUtils.getDestinationLocation(targetLocation, degrees((float) bearing),
(float) d);
ScreenPosition tweenPos = map.getScreenPosition(tweenLocation);
vertex(tweenPos.x, tweenPos.y);
}
endShape();
}