Fix transport stops

This commit is contained in:
Victor Shcherb 2016-08-02 11:05:10 +02:00
parent 91da4e507e
commit a9b04a4466

View file

@ -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);
}