Fix opening split segments in analyze on map

This commit is contained in:
PavelRatushny 2017-06-26 19:09:09 +03:00
parent d2105e135d
commit 64fad214f3

View file

@ -426,14 +426,16 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
float r = 3 * tileBox.getDensity();
for (int i = 0; i < xAxisPoints.size(); i++) {
WptPt axisPoint = xAxisPoints.get(i);
if (axisPoint.getLatitude() >= latLonBounds.bottom
&& axisPoint.getLatitude() <= latLonBounds.top
&& axisPoint.getLongitude() >= latLonBounds.left
&& axisPoint.getLongitude() <= latLonBounds.right) {
float x = tileBox.getPixXFromLatLon(axisPoint.getLatitude(), axisPoint.getLongitude());
float y = tileBox.getPixYFromLatLon(axisPoint.getLatitude(), axisPoint.getLongitude());
canvas.drawCircle(x, y, r + 2 * (float) Math.ceil(tileBox.getDensity()), paintGridOuterCircle);
canvas.drawCircle(x, y, r + (float) Math.ceil(tileBox.getDensity()), paintGridCircle);
if (axisPoint != null) {
if (axisPoint.getLatitude() >= latLonBounds.bottom
&& axisPoint.getLatitude() <= latLonBounds.top
&& axisPoint.getLongitude() >= latLonBounds.left
&& axisPoint.getLongitude() <= latLonBounds.right) {
float x = tileBox.getPixXFromLatLon(axisPoint.getLatitude(), axisPoint.getLongitude());
float y = tileBox.getPixYFromLatLon(axisPoint.getLatitude(), axisPoint.getLongitude());
canvas.drawCircle(x, y, r + 2 * (float) Math.ceil(tileBox.getDensity()), paintGridOuterCircle);
canvas.drawCircle(x, y, r + (float) Math.ceil(tileBox.getDensity()), paintGridCircle);
}
}
}
}