mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-12 22:18:48 +00:00
Navitia: Take the location priority into account when suggesting locations.
This commit is contained in:
parent
e227e254f1
commit
bb76498c87
1 changed files with 2 additions and 1 deletions
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue