Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

How can I cancel Geocoder.GetPositionsForAddressAsync() if it doesn't take a CancellationToken?

$
0
0

I find that the Geocoder calls can take a long time occasionally, so if the user leaves the page that is doing the geocoding before the geocoding is complete, I want to cancel the geocoding.

I know that you can send a CancellationToken to a Task to cancel it, but how would I cancel a call like this one, which doesn't take a token?


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>