<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Route does not draw on first attempt, but does subsequently in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591067#M7249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WIthout a more full example that can be debugged I'll just be guessing here. But the fact that it works except for the first time, indicates some of your async initialization code is problematic, and where you should look first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 May 2019 22:21:34 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2019-05-30T22:21:34Z</dc:date>
    <item>
      <title>Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591060#M7242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;env:&lt;/P&gt;&lt;P&gt;Xamarin Android on Visual Studio 17 - min API level 21, target - 27, TLS 1.2 settings/ testing on Samsung Galaxy S8 device&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help with this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 17:22:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591060#M7242</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-05-30T17:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591061#M7243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a&amp;nbsp;sample you could share that demonstrates this behavior?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 20:02:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591061#M7243</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2019-05-30T20:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591062#M7244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How's this?&lt;/P&gt;&lt;P&gt;Well,... there are a lot of files, but here are the relevant excerpts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Invoker *:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;Activity&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;protected override void OnCreate(Bundle bundle)&lt;BR /&gt; {&lt;BR /&gt; base.OnCreate(bundle);&lt;/P&gt;&lt;P&gt;// Create your application here&lt;BR /&gt; if (Intent.HasExtra("MapPoints"))&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_mapPointString = Intent.Extras.GetString("MapPoints");&lt;BR /&gt; if (Intent.HasExtra("RelocatePoint"))&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_relocatePoint = Intent.GetBooleanExtra("RelocatePoint", false);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (Intent.HasExtra("Routing") &amp;amp;&amp;amp; Intent.GetBooleanExtra("Routing", true))&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;SetContentView(Resource.Layout._esrimap_layout);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_mapFrag = FragmentManager.FindFragmentById&amp;lt;CMIPEsriMapFragment&amp;gt;(Resource.Id.esrimap);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;Task.Run(() =&amp;gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_mapFrag.DrawRoute = true;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_mapFrag.Setup(_mapPointString, _relocatePoint);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;}).ContinueWith(t =&amp;gt; {&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&amp;lt; Exception Stuff &amp;gt;&amp;gt; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}, TaskContinuationOptions.OnlyOnFaulted);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;try&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;Fragment&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;public void Setup(string mapPointsJsonString, bool relocatePoint)&lt;BR /&gt; {...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Task.Run(async () =&amp;gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (_map == null) // get a freshy&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;await _map.LoadAsync();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&amp;lt;&amp;lt; Exception Stuff &amp;gt;&amp;gt; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private void OnMapVisible(object sender, DrawStatusChangedEventArgs e)&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if (e.Status == DrawStatus.Completed)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (DrawRoute)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DoRoute();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DrawRoute = false; // Quasi idempotent &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/grin.png" /&gt; &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;* The Meat *:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private void InitAuth()&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;// Get a reference to the (singleton) AuthenticationManager for the app&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;AuthenticationManager authMgr = AuthenticationManager.Current;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Assign the method that AuthenticationManager will call to challenge for secured resources&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;authMgr.ChallengeHandler = new ChallengeHandler(CreateCredentialAsync);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;private async Task&amp;lt;Credential&amp;gt; CreateCredentialAsync(CredentialRequestInfo info)&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;try&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// See if authentication is already in process&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (_taskCompletionSource != null)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return null;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Create a new TaskCompletionSource for the login operation.&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Passing the CredentialRequestInfo object to the constructor will make it available from its AsyncState property.&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_taskCompletionSource = new TaskCompletionSource&amp;lt;Credential&amp;gt;(info);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;await LoginOtherStuff();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Return the login task, the result will be ready when completed (LoginOtherStuff method gets called).&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return await _taskCompletionSource.Task;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;catch(AggregateException ae)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&amp;lt; Exception Stuff &amp;gt;&amp;gt; ...&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;public async Task LoginOtherStuff()&lt;BR /&gt; {&lt;BR /&gt; try&lt;BR /&gt; {&amp;nbsp;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;// Get the associated CredentialRequestInfo (will need the URI of the service being accessed).&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;CredentialRequestInfo requestInfo = _taskCompletionSource.Task.AsyncState as CredentialRequestInfo;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Create a token credential using the provided username and password.&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;TokenCredential userCredentials = await AuthenticationManager.Current.GenerateCredentialAsync&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(requestInfo.ServiceUri,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Resources.GetText(Resource.String.hotdog),&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Resources.GetText(Resource.String.fish_taco),&amp;nbsp;&amp;nbsp;&amp;nbsp;// I know, I know... You can't install the app.&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;requestInfo.GenerateTokenOptions);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Set the result on the task completion source.&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_taskCompletionSource.TrySetResult(userCredentials);&lt;BR /&gt;}&lt;BR /&gt; catch (AggregateException ae)&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&amp;lt; Exception Stuff &amp;gt;&amp;gt; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 21:09:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591062#M7244</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-05-30T21:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591063#M7245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This bit looks suspicions wrt on first load:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Task.Run(async () =&amp;gt;&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (_map == null) // get a freshy&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;await _map.LoadAsync();&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I'm not seeing that you are awaiting the map load, so perhaps the code execution is significantly different when map is null the first time?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 21:13:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591063#M7245</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2019-05-30T21:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591064#M7246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;Sorry, here's the rest of it:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;Task.Run(async () =&amp;gt;&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (_map == null) // get a freshy&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;await _map.LoadAsync();&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}).ContinueWith(t =&amp;gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&amp;lt; Exception Stuff &amp;gt;&amp;gt; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}, TaskContinuationOptions.OnlyOnFaulted);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 21:31:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591064#M7246</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-05-30T21:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591065#M7247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But where's the code that actually draws stuff? When is it called?&lt;/P&gt;&lt;P&gt;And is there a reason you don't just use&amp;nbsp;async/await instead of Task.Run? (without it, it&amp;nbsp;can get easy to swallow errors)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;public async Task Setup(string mapPointsJsonString, bool relocatePoint)&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; try &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (_map == null)&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;await _map.LoadAsync();&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; catch(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; {&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;&amp;lt; Exception Stuff &amp;gt;&amp;gt; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;}&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;In your oncreate method I also see you're using Task.Run, but I don't really see why you're doing that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 21:37:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591065#M7247</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2019-05-30T21:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591066#M7248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, my bad. There's a lot of gobble-de-gook in here. Map is created in Fragment.OnCreate():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public override void OnCreate(Bundle savedInstanceState)&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;base.OnCreate(savedInstanceState);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Create your fragment here&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;DrawRoute = false;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_myMapView = new MapView(Activity);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_myMapView.InteractionOptions = new MapViewInteractionOptions&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IsMagnifierEnabled = false//,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;Basemap bm = new Basemap(new &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Uri("https://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_map = new Map(bm);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_myMapView.Map = _map;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Drawing in DoRoute():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public async void DoRoute()&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;InitAuth();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_myMapView.LocationDisplay.IsEnabled = true; // to facilitate taking of the device location&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var pos = _myMapView.LocationDisplay.Location.Position; // device current location.&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_myMapView.LocationDisplay.ShowLocation = false;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;MapPoint circleCenter = new MapPoint(pos.X, pos.Y, SpatialReferences.Wgs84);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;CFMapPoint youLocation = PointUtilities.ToCFMapPoint(circleCenter);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;youLocation.NavigateTo = true;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;youLocation.Icon = Resource.Drawable.you;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Stop start = new Stop(circleCenter);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;Stop stop = new Stop(PointUtilities.ToMapPoint(_mapPoints[0]));&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;_routeStops = new List&amp;lt;Stop&amp;gt; { start, stop };&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;_routeGraphicsOverlay = new GraphicsOverlay() { Id = Resources.GetText(Resource.String.route_overlay) };&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RouteTask solveRouteTask = await RouteTask.CreateAsync(&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;new Uri("https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World"));&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RouteParameters routeParams = await solveRouteTask.CreateDefaultParametersAsync();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;routeParams.SetStops(_routeStops);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RouteResult solveRouteResult = await solveRouteTask.SolveRouteAsync(routeParams);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Route firstRoute = solveRouteResult.Routes.FirstOrDefault();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Activity.RunOnUiThread(() =&amp;gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Polyline routePolyline = firstRoute.RouteGeometry;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SimpleLineSymbol routeSymbol =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;new SimpleLineSymbol(SimpleLineSymbolStyle.Solid, Color.SlateBlue, 4.0);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Graphic routeGraphic = new Graphic(routePolyline, routeSymbol);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_routeGraphicsOverlay.Graphics.Add(routeGraphic);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_myMapView.GraphicsOverlays.Insert(0, _routeGraphicsOverlay);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// adjust the envelope in such case the route goes off the screen&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (_markerOverlay.Extent.Width &amp;lt; _routeGraphicsOverlay.Extent.Width * 1.15 ||&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_markerOverlay.Extent.Height &amp;lt; _routeGraphicsOverlay.Extent.Height * 1.15)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;EnvelopeBuilder myEnvelopeBuilder = new EnvelopeBuilder(_routeGraphicsOverlay.Extent);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;myEnvelopeBuilder.UnionOf(_markerOverlay.Extent);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;myEnvelopeBuilder.Expand(1.15);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_myMapView.SetViewpointAsync(new Viewpoint(myEnvelopeBuilder.Extent));&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_taskCompletionSource = null;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;catch (AggregateException ae)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach (var ex in ae.InnerExceptions)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll have to ruminate the other question. Kind of a noob. The original architectural framework came from other noob went "bye-bye." I just refactored for Esri maps, and snuffled for memory leaks and bugs and such.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 22:11:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591066#M7248</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-05-30T22:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591067#M7249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WIthout a more full example that can be debugged I'll just be guessing here. But the fact that it works except for the first time, indicates some of your async initialization code is problematic, and where you should look first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 22:21:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591067#M7249</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2019-05-30T22:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591068#M7250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, my [limited] understanding of async methods is that they have to be called/awaited from another async method. With such a scheme,&amp;nbsp;you just go on async-ing the callers forever. I'm not going to make the life cycle methods async. My attitude is that you have to cauterize it somewhere. The technique that I've read about on c# forums is to start a Task and let the async junk&amp;nbsp;run in it's own thread off to the side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This project is 55 source code files not including resources. I'm not at leisure to go dumping it on the internet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the advice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 22:47:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591068#M7250</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-05-30T22:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591069#M7251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;gt; my [limited] understanding of async methods is that they have to be called/awaited from another async method.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;No that's not the case. You're just adding more layers of async'ness, more thread jumping etc. That also means you're less likely to know what thread you're own and getting yourself into more problems. You&amp;nbsp;definitely shouldn't be launching a task just to run a task.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp;&amp;nbsp;I'm not going to make the life cycle methods async.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;There's no problem with this, and you should.&amp;nbsp;It's true you should avoid "async void" and use "async task" when you can, but of course overrides it's not possible, and you normally handle that with try/catch to ensure you don't throw out of context.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;This project is 55 source code files not including resources. I'm not at leisure to go dumping it on the internet.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wasn't suggesting that. A small sample that reproduces the problem instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can recommend this short 6-part series (they are short) on async/await:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://channel9.msdn.com/Series/Three-Essential-Tips-for-Async/"&gt;https://channel9.msdn.com/Series/Three-Essential-Tips-for-Async/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 22:59:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591069#M7251</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2019-05-30T22:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591070#M7252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, thanks. I shall ruminate this async business over my weekend.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2019 23:13:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591070#M7252</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-05-30T23:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591071#M7253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, the exception is getting thrown on this line in the DoRoute method at the top of the try block:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RouteTask solveRouteTask = await RouteTask.CreateAsync(&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;new Uri("&lt;/SPAN&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Froute.arcgis.com%2Farcgis%2Frest%2Fservices%2FWorld%2FRoute%2FNAServer%2FRoute_World" rel="nofollow" style="color: #287433; background-color: #ffffff; border: 0px; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World&lt;/A&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;"));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;AggregateException.InnerException:&lt;/SPAN&gt;&lt;/P&gt;&lt;H1&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 15px;"&gt;MemoryStream.CopyToAsync (System.IO.Stream destination, System.Int32 bufferSize, System.Threading.CancellationToken cancellationToken)&lt;/SPAN&gt;&lt;/H1&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;Message:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;"Cannot access a closed Stream."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;ObjectName:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;Not sure how to interpret that as I don't know what is going on inside RouteTask.CreateAsync...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 21:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591071#M7253</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-06-03T21:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591072#M7254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That error doesn't doesn't look good. Is there a stack trace on that exception that might give us a little more insight into where it's going wrong?&lt;BR /&gt;And can you access that URL from the browser of that device?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 23:50:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591072#M7254</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2019-06-03T23:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591073#M7255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;...also which Http&amp;nbsp;Client implementation have you configured your app to use? (some of them are rather buggy). See Project properties -&amp;gt; Android Options -&amp;gt; Advanced.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 23:52:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591073#M7255</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2019-06-03T23:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591074#M7256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL data-test-class="stack-trace"&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;Esri.ArcGISRuntime.Http&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;ArcGISHttpClientHandler+ArcGISClientHandlerInternal+&amp;lt;&amp;gt;c__DisplayClass14_1&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;&amp;lt;SendAsync&amp;gt;b__0&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task`1[TResult] t&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Threading.Tasks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;ContinuationResultTaskFromResultTask`2[TAntecedentResult,TResult]&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;InnerInvoke&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Threading.Tasks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;Task&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;Execute&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;Esri.ArcGISRuntime.Http&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;ArcGISHttpClientHandler+ArcGISClientHandlerInternal+&amp;lt;SendAsync&amp;gt;d__14&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;MoveNext&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;ThrowForNonSuccess&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;HandleNonSuccessAndDebuggerNotification&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;ValidateEnd&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter`1[TResult]&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;GetResult&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;Esri.ArcGISRuntime.Http&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;ArcGISHttpClientHandler+ArcGISClientHandlerInternal+&amp;lt;SendAsync&amp;gt;d__14&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;MoveNext&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;ThrowForNonSuccess&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;HandleNonSuccessAndDebuggerNotification&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;ValidateEnd&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult]&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;GetResult&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Net.Http&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;HttpClient+&amp;lt;SendAsyncWorker&amp;gt;d__49&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;MoveNext&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;ThrowForNonSuccess&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;HandleNonSuccessAndDebuggerNotification&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;ValidateEnd&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult]&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;GetResult&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;Esri.ArcGISRuntime.Internal&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;RequestRequiredHandler+&amp;lt;IssueRequestAndRespond&amp;gt;d__14&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;MoveNext&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;ThrowForNonSuccess&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;HandleNonSuccessAndDebuggerNotification&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;ValidateEnd&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;ConfiguredTaskAwaitable+ConfiguredTaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;GetResult&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;Esri.ArcGISRuntime.Tasks.NetworkAnalysis&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;RouteTask+&amp;lt;CreateAsync&amp;gt;d__11&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;MoveNext&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;ThrowForNonSuccess&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;HandleNonSuccessAndDebuggerNotification&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;ValidateEnd&lt;/SPAN&gt;&amp;nbsp;(&lt;SPAN data-highlight="methodParams"&gt;System.Threading.Tasks.Task task&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;System.Runtime.CompilerServices&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;TaskAwaiter`1[TResult]&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;GetResult&lt;/SPAN&gt;&amp;nbsp;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-test-class="stack-frame"&gt;&lt;DIV data-test-class="stack-frame-framework"&gt;&lt;SPAN style="font-size: 13px;"&gt;gov.ca.fire.CMIP.Fragments&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV data-test-class="stack-frame-content"&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="className"&gt;CMIPEsriMapFragment+&amp;lt;DoRoute&amp;gt;d__33&lt;/SPAN&gt;.&lt;SPAN data-highlight="method"&gt;MoveNext&lt;/SPAN&gt;&amp;nbsp;()&amp;nbsp;&lt;SPAN data-highlight="file"&gt;C:\Temp\CMIP.Esri\CMIP\CMIP\Fragments\CMIPEsriMapFragment.cs&lt;/SPAN&gt;&lt;SPAN data-highlight="line"&gt;:521&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="line"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="line"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="line"&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/449601_Screenshot_20190604-064741_Chrome.jpg" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="line"&gt;-That error code is 403.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="line"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN data-highlight="line"&gt;HTTP client is "Android."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2019 14:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591074#M7256</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-06-04T14:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591075#M7257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In between when this gets called, and when it&amp;nbsp;throws the exception, CreateCredentialAsync gets called:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RouteTask solveRouteTask = await RouteTask.CreateAsync(&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;new Uri("&lt;/SPAN&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Froute.arcgis.com%2Farcgis%2Frest%2Fservices%2FWorld%2FRoute%2FNAServer%2FRoute_World" rel="nofollow" style="color: #287433; background-color: #ffffff; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World&lt;/A&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;"));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;I can see that it is actually getting a token, but&amp;nbsp;by the time&amp;nbsp;it gets&amp;nbsp;around to completing&amp;nbsp;this RouteTask.CreateAsync method, the Exception gets thrown:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&lt;IMG __jive_id="449982" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/449982_screengrab.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 16:37:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591075#M7257</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-06-10T16:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591076#M7258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there no one that can help with this problem? All the stuff that I have written appears to be processing correctly, but the black-box Esri stuff returns an exception. Where do I go from here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2019 18:38:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591076#M7258</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-06-12T18:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591077#M7259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;More info, let me know if you need the entire trace:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/450244_RouteDrawStackTrace.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is at the same breakpoint pictured previously.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2019 17:46:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591077#M7259</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-06-13T17:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591078#M7260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a shot in the dark suggestion, have you tried making the calls synchronous instead of asynchronous to see if it makes a difference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change all await calls to .GetAwaiter().GetResult()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you're doing await RouteTask.GetRouteAsync(), it would change to RouteTask.GetRouteAsync().GetAwaiter().GetResult().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to clarify, I'm not suggesting this as a solution to the problem (I would never advocate running things synchronously on the UI layer), but if it helps it would at least isolate the issue to the async/await functionality.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2019 18:07:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591078#M7260</guid>
      <dc:creator>KyleGruber</dc:creator>
      <dc:date>2019-06-13T18:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Route does not draw on first attempt, but does subsequently</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591079#M7261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, that was a good idea anyway. (Previously, I had implemented the changes that Morten had recommended). Unfortunately, neither of these&amp;nbsp;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...&amp;nbsp; &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2019 22:30:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/route-does-not-draw-on-first-attempt-but-does/m-p/591079#M7261</guid>
      <dc:creator>ITS_JohnColaneri</dc:creator>
      <dc:date>2019-06-13T22:30:36Z</dc:date>
    </item>
  </channel>
</rss>

