EasyGIS.NET icon indicating copy to clipboard operation
EasyGIS.NET copied to clipboard

EGIS Web: Tiles - Cancelling requests when map change zoom/position.

Open theo2f opened this issue 3 years ago • 0 comments

We talk about it some time ago.

When we change the zoom/position, the tiles are requested asynchronously and loaded onto the screen when the download is complete. Although it is not a queue, they are requests awaiting completion. If we change the zoom/position before these tiles are loaded, a new list of requests is made. So on for each changed zoom/position. It turns out that depending on the internet connection speed or server demand, the tiles take a long time to be downloaded and shown on the screen. Analyzing the code, I was thinking about it and I think a solution would be to abort the requests when the zoom/position is changed. It would make the map display faster.

I did some tests with CancellationTokenSource but I could'nt good results. Anyway I think that's a good way to solve this. Probably I did something wrong on implementation.

Well, this is a important thing to think when we talk about implementation of EGIS on web applications.

Thank you for this great job on EGIS!

theo2f avatar Mar 17 '21 17:03 theo2f