PathLayer: do not try to calculate zero length great circle path (#390)

This commit is contained in:
Andrey Novikov 2017-08-28 16:53:54 +03:00 committed by Emux
parent b110314077
commit 7142f3410d

View File

@ -153,6 +153,8 @@ public class PathLayer extends Layer {
/* add one point for every 100kms of the great circle path */
int numberOfPoints = (int) (length / 100000);
if (numberOfPoints == 0)
return;
addGreatCircle(startPoint, endPoint, numberOfPoints);
}