Hi all, as you can see, I’m unable to retrieve the entire flight path. Usually stops showing up after 6/7 hours. Is it an API limitation or something I’m doing wrong (fetching from flightRoute endpoint currently). If it is a limitation can someone help me out on how others have done it on their sites?
It is also causing me problems on calculating ETA and Distance remaining. Help on this too would be helpful!
i don’t use the flight route endpoint. Are you still having issues with it?
Yea even I stopped using that endpoint. The flight route endpoint gives a maximum of 1000 positions as far as I know..
What do u use ?
You can always cache the user positions and build your own flight route. It gives greater flexibility over what you want stored, and how often! It’s what we do with InfiniteView.
I’ve tried doing that but it never works out for some reason
. It always dives into making a straight line from the last known point, sometimes it’s far. And even if u cache that, u still have the funky straight line, not really sure how to fix it. Not sure if it’s only happening to me or something
Even I use the caching way now. it works. Instead of the FlightRoute API call you can use the other api which gives a users latitude, longitude, speed etc.. each time
Gonna have to explain that in my DMs if u can
I think Gaurav and Will are describing the same thing.
Each time you use the Get Flights endpoint, you store the result you get from that (with a timestamp if you find it useful to track when that call was made) as cache.
From there you can build a flight path by iterating through that using the flight ID.
There are ways of optimising this, such as building the flightpaths as you make the Get Flights request so you don’t do this every time someone clicks on a flight, but that’s the most basic example I can think of.
Yes, exactly this!
There are lots of ways to optimise, happy to discuss in DMs if anyone is interested.
