GithubHelp home page GithubHelp logo

Comments (6)

aelkhour avatar aelkhour commented on July 17, 2024

I'll provide for the first point a fix early January, thanks.

What is the expected behavior for earlier and later trips?

from public-transport-enabler.

schildbach avatar schildbach commented on July 17, 2024

It's basically paging. If you request 4 trips and then request a later 4 trips you should get the same 8 trips you would have gotten if you requested 8 trips to begin with. (Of course if you operate on dynamic data, it can happen that the query for next yields more recent data than you would have gotten at the time of the first call.)

One difference between the various implementations is that some return really only the next trips, and some will repeat everything that was queried already and add the next trips. Öffi tries to accomodate for that, but I suspect there's still bugs lurking. As a rule of thumb, return whatever you get from the server.

from public-transport-enabler.

aelkhour avatar aelkhour commented on July 17, 2024

@schildbach I had set the requested trip count to 1 for testing purposes, but I realised that now navitia returns only one trip unless specified otherwise. Should I take the default trip count for the navitia provider, or hardcode some value?

from public-transport-enabler.

schildbach avatar schildbach commented on July 17, 2024

AbstractNetworkProvider has the "numTripsRequested" property. That's the value you should use. Currently the default is set to 6. If Navitia for some reason should have a lower default, it might make sense to refactor the code to allow the service provider pick a default.

from public-transport-enabler.

aelkhour avatar aelkhour commented on July 17, 2024

@grote Could you retest please?

from public-transport-enabler.

grote avatar grote commented on July 17, 2024

I'm getting 6 trips now like expected. Thanks for the fix!

from public-transport-enabler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.