Commit fa577b18 authored by Volker Krause's avatar Volker Krause
Browse files

Fix Navitia location queries for rental bike stations and any type

We can only use the POI filter when exclusively looking for bike sharing
stations, otherwise we also filter out all other location types.
parent 102c33cf
......@@ -216,7 +216,10 @@ bool NavitiaBackend::queryLocation(const LocationRequest &req, LocationReply *re
if (req.types() & Location::RentedVehicleStation) {
query.addQueryItem(QStringLiteral("type[]"), QStringLiteral("poi"));
query.addQueryItem(QStringLiteral("add_poi_infos[]"), QStringLiteral("bss_stands"));
query.addQueryItem(QStringLiteral("filter"), QStringLiteral("poi_type.id=poi_type:amenity:bicycle_rental"));
// filter is exclusive, so we cannot use this when also looking for other objects
if ((req.types() & ~(Location::RentedVehicleStation | Location::RentedVehicle)) == 0) {
query.addQueryItem(QStringLiteral("filter"), QStringLiteral("poi_type.id=poi_type:amenity:bicycle_rental"));
}
}
if (req.hasCoordinate()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment