Beispiel #1
0
        private void WebMapLoadStatusChanged(object sender, Esri.ArcGISRuntime.LoadStatusEventArgs e)
        {
            Map map = (Map)sender;

            // Report errors if map failed to load.
            if (e.Status == LoadStatus.Loaded)
            {
                // Unsubscribe from event.
                map.LoadStatusChanged -= WebMapLoadStatusChanged;
            }
            else if (e.Status == LoadStatus.FailedToLoad)
            {
                // Unsubscribe from event.
                map.LoadStatusChanged -= WebMapLoadStatusChanged;

                // Show the error
                Exception err = map.LoadError;
                if (err != null)
                {
                    UIAlertView alert = new UIAlertView("Map Load Error", err.Message, (IUIAlertViewDelegate)null,
                                                        "OK", null);
                    alert.Show();
                }
            }
        }
Beispiel #2
0
 private void WebMapLoadStatusChanged(object sender, Esri.ArcGISRuntime.LoadStatusEventArgs e)
 {
     // Report errors if map failed to load
     if (e.Status == LoadStatus.FailedToLoad)
     {
         Map       map = (Map)sender;
         Exception err = map.LoadError;
         if (err != null)
         {
             Device.BeginInvokeOnMainThread(() => Application.Current.MainPage.DisplayAlert(err.Message, "Map Load Error", "OK"));
         }
     }
 }
 private void WebMapLoadStatusChanged(object sender, Esri.ArcGISRuntime.LoadStatusEventArgs e)
 {
     // Report errors if map failed to load
     if (e.Status == LoadStatus.FailedToLoad)
     {
         Map       map = (Map)sender;
         Exception err = map.LoadError;
         if (err != null)
         {
             MessageBox.Show(err.Message, "Map Load Error");
         }
     }
 }
 private void WebMapLoadStatusChanged(object sender, Esri.ArcGISRuntime.LoadStatusEventArgs e)
 {
     // Report errors if map failed to load
     if (e.Status == LoadStatus.FailedToLoad)
     {
         Map       map = (Map)sender;
         Exception err = map.LoadError;
         if (err != null)
         {
             AlertDialog.Builder alertBuilder = new AlertDialog.Builder(this);
             alertBuilder.SetTitle("Map Load Error");
             alertBuilder.SetMessage(err.Message);
             alertBuilder.Show();
         }
     }
 }
Beispiel #5
0
 private async void WebMapLoadStatusChanged(object sender, Esri.ArcGISRuntime.LoadStatusEventArgs e)
 {
     // Report errors if map failed to load
     if (e.Status == LoadStatus.FailedToLoad)
     {
         Map       map = (Map)sender;
         Exception err = map.LoadError;
         if (err != null)
         {
             MessageDialog dialog = new MessageDialog(err.Message, "Map Load Error");
             await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async() =>
             {
                 await dialog.ShowAsync();
             });
         }
     }
 }