Select to view content in your preferred language

Route does not draw on first attempt, but does subsequently

2504
20
05-30-2019 10:22 AM
ITS_JohnColaneri
New Contributor

env:

Xamarin Android on Visual Studio 17 - min API level 21, target - 27, TLS 1.2 settings/ testing on Samsung Galaxy S8 device

I've been struggling for some time with an issue where: when loading a map and attempting to draw a route, the route draw fails (just doesn't draw it - pretty sure the route-solve is not throwing any errors). If I back-up in the GUI, and initiate the map/route draw again, the subsequent attempts succeed.

I "back-burner"-ed this bug for a couple months to work on other aspects of the app. I observed that the map was "Loaded," but not drawn before the route-solve started, so I thought "Ah ha!" I've switched the code around to wait for the "DrawStatus.Completed" event instead, (and made it quasi-idempotent with a bool switch so the route only gets initiated once). I'm still getting the same result though. First time through, no route. All subsequent attempts are fine (if a little sluggish).

Can anyone help with this?

0 Kudos
20 Replies
ITS_JohnColaneri
New Contributor

Well, that was a good idea anyway. (Previously, I had implemented the changes that Morten had recommended). Unfortunately, neither of these have born fruit. I tracked down all the "await"s on the critical path, and changed them to GetAwaiter().GetResult()'s. Still wind up in the same bucket on the Exception tree...   😕

0 Kudos