Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
85787d03f2
2 changed files with 21 additions and 18 deletions
|
@ -159,7 +159,7 @@ public class TransportStopController extends MenuController {
|
|||
|
||||
for (TransportIndexRepository t : reps) {
|
||||
if (t.acceptTransportStop(transportStop)) {
|
||||
boolean empty = transportStop.getReferencesToRoutes() != null && transportStop.getReferencesToRoutes().length > 0;
|
||||
boolean empty = transportStop.getReferencesToRoutes() == null || transportStop.getReferencesToRoutes().length == 0;
|
||||
if(!empty) {
|
||||
addRoutes(useEnglishNames, t, transportStop, transportStop, 0);
|
||||
}
|
||||
|
|
|
@ -119,13 +119,13 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
|
|||
if (n.getLocation() == null){
|
||||
continue;
|
||||
}
|
||||
if(!ms.add(n.getName())) {
|
||||
// only unique names
|
||||
continue;
|
||||
}
|
||||
int x = (int) tb.getPixXFromLatLon(n.getLocation().getLatitude(), n.getLocation().getLongitude());
|
||||
int y = (int) tb.getPixYFromLatLon(n.getLocation().getLatitude(), n.getLocation().getLongitude());
|
||||
if (Math.abs(x - ex) <= radius && Math.abs(y - ey) <= radius) {
|
||||
if(!ms.add(n.getName())) {
|
||||
// only unique names
|
||||
continue;
|
||||
}
|
||||
radius = rp;
|
||||
res.add(n);
|
||||
}
|
||||
|
@ -202,21 +202,24 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
|
|||
if(route != null) {
|
||||
objects = route.getForwardStops();
|
||||
}
|
||||
for (TransportStop o : objects) {
|
||||
float x = tb.getPixXFromLatLon(o.getLocation().getLatitude(), o.getLocation().getLongitude());
|
||||
float y = tb.getPixYFromLatLon(o.getLocation().getLatitude(), o.getLocation().getLongitude());
|
||||
if (objects != null) {
|
||||
for (TransportStop o : objects) {
|
||||
float x = tb.getPixXFromLatLon(o.getLocation().getLatitude(), o.getLocation().getLongitude());
|
||||
float y = tb.getPixYFromLatLon(o.getLocation().getLatitude(), o.getLocation().getLongitude());
|
||||
|
||||
if (intersects(boundIntersections, x, y, iconSize, iconSize)) {
|
||||
canvas.drawBitmap(stopSmall, x - stopSmall.getWidth() / 2, y - stopSmall.getHeight() / 2, paintIcon);
|
||||
} else {
|
||||
fullObjects.add(o);
|
||||
if (intersects(boundIntersections, x, y, iconSize, iconSize)) {
|
||||
canvas.drawBitmap(stopSmall, x - stopSmall.getWidth() / 2, y - stopSmall.getHeight() / 2,
|
||||
paintIcon);
|
||||
} else {
|
||||
fullObjects.add(o);
|
||||
}
|
||||
}
|
||||
for (TransportStop o : fullObjects) {
|
||||
float x = tb.getPixXFromLatLon(o.getLocation().getLatitude(), o.getLocation().getLongitude());
|
||||
float y = tb.getPixYFromLatLon(o.getLocation().getLatitude(), o.getLocation().getLongitude());
|
||||
Bitmap b = stopBus;
|
||||
canvas.drawBitmap(b, x - b.getWidth() / 2, y - b.getHeight() / 2, paintIcon);
|
||||
}
|
||||
}
|
||||
for (TransportStop o : fullObjects) {
|
||||
float x = tb.getPixXFromLatLon(o.getLocation().getLatitude(), o.getLocation().getLongitude());
|
||||
float y = tb.getPixYFromLatLon(o.getLocation().getLatitude(), o.getLocation().getLongitude());
|
||||
Bitmap b = stopBus;
|
||||
canvas.drawBitmap(b, x - b.getWidth() / 2, y - b.getHeight() / 2, paintIcon);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue