What is the bug?
TileLayer's updateInterval option has on affect. This causes fetching and loading a lot of tiles when flinging or animating the map a long way.
What is the expected behaviour?
Presumably the documented behavior of updateInterval:
/// Tiles will not update more than once every `updateInterval` (default 200
/// milliseconds) when panning. It can be null (but it will calculating for
/// loading tiles every frame when panning / zooming, flutter is fast) This
/// can save some fps and even bandwidth (ie. when fast panning / animating
/// between long distances in short time)
How can we reproduce this issue?
This is easiest to notice when animating the map a long way and watching network requests for tiles. I will probably add a recording to demonstrate this at some point.
Do you have a potential solution?
Re-instate the throttling logic so that updateInterval works again.
Can you provide any other information?
I wanted to determine why so many tiles were being loaded when I animated the map position across a large distance and after a quick look at the TileLayer code it is apparent that updateInterval has no affect. Similarly the throttleUpdate StreamController is being initialized and disposed but it is not hooked up to anything.
It seems that as part of #1333 this commit commented out throttling code with a // TODO fix note but it's not clear whether the throttling code was broken already or if it was broken during that PR and the author forgot to fix it before the PR was merged. I intend to re-instate the throttling logic and if it was already broken that would be helpful to know in order to avoid recreating any bugs.
Platforms Affected
Android, iOS, Web, Windows, MacOS, Linux
Severity
Obtrusive: Prevents normal functioning but causes no errors in the console
Frequency
Consistently: Always occurs at the same time and location
Requirements
What is the bug?
TileLayer'supdateIntervaloption has on affect. This causes fetching and loading a lot of tiles when flinging or animating the map a long way.What is the expected behaviour?
Presumably the documented behavior of
updateInterval:How can we reproduce this issue?
This is easiest to notice when animating the map a long way and watching network requests for tiles. I will probably add a recording to demonstrate this at some point.
Do you have a potential solution?
Re-instate the throttling logic so that
updateIntervalworks again.Can you provide any other information?
I wanted to determine why so many tiles were being loaded when I animated the map position across a large distance and after a quick look at the
TileLayercode it is apparent thatupdateIntervalhas no affect. Similarly the throttleUpdate StreamController is being initialized and disposed but it is not hooked up to anything.It seems that as part of #1333 this commit commented out throttling code with a
// TODO fixnote but it's not clear whether the throttling code was broken already or if it was broken during that PR and the author forgot to fix it before the PR was merged. I intend to re-instate the throttling logic and if it was already broken that would be helpful to know in order to avoid recreating any bugs.Platforms Affected
Android, iOS, Web, Windows, MacOS, Linux
Severity
Obtrusive: Prevents normal functioning but causes no errors in the console
Frequency
Consistently: Always occurs at the same time and location
Requirements
flutter doctorfinds no relevant issues