laptop and a wrench

Bug

The Weather Underground widget sample fails to update accurately after saving and re-opening the view.

Zuletzt veröffentlicht: April 8, 2019 ArcGIS Runtime SDK for WPF
Bug-ID-Nummer BUG-000082614
EingereichtOctober 15, 2014
Zuletzt geändertAugust 1, 2025
Gilt fürArcGIS Runtime SDK for WPF
Gefunden in Version10.2.3
Behoben in VersionQ1 2015
StatusFixed

Workaround

The issue is specific to the call to webClient.DownloadStringAsync.Block the user interface (UI) thread and get the values synchronously, and the value is updated properly.Also, rewrite the UpdateWeather method to use the async await pattern, and the value is updated properly.For example:private async void UpdateWeather(){if (NoDeveloperKey) return;// Find the new center of the extent of the map in lat, long.client.Geometry.MapPoint centerPoint = _map.Extent.GetCenter();client.Geometry.MapPoint geographicPoint = Transform.WebMercatorToGeographic(centerPoint);// Get a new weather observation.WebClient webClient = new WebClient();//webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClient_DownloadStringCompleted);string x = await webClient.DownloadStringTaskAsync(new Uri(String.Format("{0}{1},{2}.json", _weatherServiceUrl, geographicPoint.Y, geographicPoint.X)));JavaScriptSerializer serializer = new JavaScriptSerializer();Response response = serializer.Deserialize<Response>(x);this.observation = response.current_observation;this.satelliteImage = response.satellite;}

Schritte zur Reproduzierung

Bug-ID: BUG-000082614

Software:

  • ArcGIS Runtime SDK for WPF

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln