Navitia: Take the location priority into account when suggesting locations.

This commit is contained in:
Torsten Grote 2016-03-07 20:18:41 -03:00 committed by Andreas Schildbach
parent e227e254f1
commit bb76498c87

View file

@ -993,10 +993,11 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider
for (int i = 0; i < places.length(); ++i) for (int i = 0; i < places.length(); ++i)
{ {
final JSONObject place = places.getJSONObject(i); final JSONObject place = places.getJSONObject(i);
final int priority = place.optInt("quality", 0);
// Add location to station list. // Add location to station list.
final Location location = parseLocation(place); final Location location = parseLocation(place);
locations.add(new SuggestedLocation(location)); locations.add(new SuggestedLocation(location, priority));
} }
} }