.getDestinationLatitude())
|| Double.isNaN(super.getModelElement()
.getDestinationLongitude()))
return;
Arrow destinationArrow = new Arrow();
double distance = 1000 * Utilities.calculateDistance(
GlobalPosition.from(
Point2DUtils.convertPoint(super.getModelElement()
.getPosition())).getLatitude(),
GlobalPosition.from(
Point2DUtils.convertPoint(super.getModelElement()
.getPosition())).getLongitude(), super
.getModelElement().getDestinationLatitude(), super
.getModelElement().getDestinationLongitude());
double angle = Utilities.calculateAngle(
Point2DUtils.convertPoint(new double[] {
super.getModelElement().getLatitude(),
super.getModelElement().getLongitude() }),
Point2DUtils.convertPoint(new double[] {
super.getModelElement().getDestinationLatitude(),
super.getModelElement().getDestinationLongitude() }));
double destinationLatitude = Math.cos(Math.toRadians(angle - 90))
* distance;
double destinationLongitude = Math.sin(Math.toRadians(angle - 90))
* distance;
destinationArrow.setColor(Color.RED);
destinationArrow.draw(painter, 0, 0, destinationLatitude,
destinationLongitude);
}