maplibre / maplibre-rs

Experimental Maps for Web, Mobile and Desktop
Apache License 2.0
1.34k stars 77 forks source link

Cancellable data/tile loading #217

Open maxammann opened 1 year ago

maxammann commented 1 year ago

maplibre-rs should be able to cancel data or tile requests after starting them.

🤔 Expected Behavior

If the user scrolls into some area then the tiles get loaded. If the user navigates away then pending requests should be cancelled.

😯 Current Behavior

Currently we have kind a work queue, which gets processed in the order of submission. No cancellation possible.

💁 Possible Solution

There are two major parts in order to support cancellation for tiles:

🔦 Context

We might switch to reqwest for the web target if it supports cancellation on all platforms.

💻 Examples

Does not apply.