Fix gpx layer
This commit is contained in:
parent
6fb5d0299a
commit
06986b8fc2
1 changed files with 10 additions and 5 deletions
|
@ -111,10 +111,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
// request to load
|
||||
final QuadRect latLonBounds = tileBox.getLatLonBounds();
|
||||
for (SelectedGpxFile g : selectedGPXFiles) {
|
||||
List<WptPt> pts = g.getGpxFile().points;
|
||||
if(pts.isEmpty() & !g.getGpxFile().routes.isEmpty()) {
|
||||
pts = g.getGpxFile().routes.get(0).points;
|
||||
}
|
||||
List<WptPt> pts = getListStarPoints(g);
|
||||
int fcolor = g.getColor() == 0 ? defPointColor : g.getColor();
|
||||
|
||||
for (WptPt o : pts) {
|
||||
|
@ -142,6 +139,14 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
}
|
||||
}
|
||||
|
||||
private List<WptPt> getListStarPoints(SelectedGpxFile g) {
|
||||
List<WptPt> pts = g.getGpxFile().points;
|
||||
if(pts.isEmpty() & !g.getGpxFile().routes.isEmpty()) {
|
||||
pts = g.getGpxFile().routes.get(0).points;
|
||||
}
|
||||
return pts;
|
||||
}
|
||||
|
||||
private void drawSegments(Canvas canvas, RotatedTileBox tileBox, List<List<WptPt>> points) {
|
||||
final QuadRect latLonBounds = tileBox.getLatLonBounds();
|
||||
for (List<WptPt> l : points) {
|
||||
|
@ -197,7 +202,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
|||
int ex = (int) point.x;
|
||||
int ey = (int) point.y;
|
||||
for (SelectedGpxFile g : selectedGpxHelper.getSelectedGPXFiles()) {
|
||||
List<WptPt> pts = g.getGpxFile().points;
|
||||
List<WptPt> pts = getListStarPoints(g);
|
||||
// int fcolor = g.getColor() == 0 ? clr : g.getColor();
|
||||
for (WptPt n : pts) {
|
||||
int x = (int) tb.getPixXFromLatLon(n.lat, n.lon);
|
||||
|
|
Loading…
Reference in a new issue