Fix #9807
This commit is contained in:
parent
da239a69ff
commit
e07d6486bf
1 changed files with 5 additions and 1 deletions
|
@ -231,9 +231,13 @@ public class TransportStopController extends MenuController {
|
||||||
stopAggregated = new TransportStopAggregated();
|
stopAggregated = new TransportStopAggregated();
|
||||||
stopAggregated.setAmenity(amenity);
|
stopAggregated.setAmenity(amenity);
|
||||||
TransportStop nearestStop = null;
|
TransportStop nearestStop = null;
|
||||||
|
String amenityName = amenity.getName().toLowerCase();
|
||||||
for (TransportStop stop : transportStops) {
|
for (TransportStop stop : transportStops) {
|
||||||
stop.setTransportStopAggregated(stopAggregated);
|
stop.setTransportStopAggregated(stopAggregated);
|
||||||
if ((stop.getName().startsWith(amenity.getName())
|
String stopName = stop.getName().toLowerCase();
|
||||||
|
if (((stopName.startsWith(amenity.getName())
|
||||||
|
|| stopName.contains(amenityName)
|
||||||
|
|| amenityName.contains(stopName))
|
||||||
&& (nearestStop == null
|
&& (nearestStop == null
|
||||||
|| nearestStop.getLocation().equals(stop.getLocation())))
|
|| nearestStop.getLocation().equals(stop.getLocation())))
|
||||||
|| stop.getLocation().equals(loc)) {
|
|| stop.getLocation().equals(loc)) {
|
||||||
|
|
Loading…
Reference in a new issue