Click or drag to resize

LoadStatus Enumeration

The load status for a loadable object.

Namespace:  Esri.ArcGISRuntime
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.9.0
Syntax
public enum LoadStatus
Members
  Member nameValueDescription
Loaded0The object is fully loaded and ready to use.
Loading1The object is currently being loaded and some functionality may not work.
FailedToLoad2The object failed to load and some functionality may not work.
NotLoaded3The object is not loaded and some functionality may not work.
Remarks
Used to determine the status of an ILoadable object.
Examples

WPF

Example Name: AccessLoadStatus

Determine the map's load status which can be: `NotLoaded`, `FailedToLoad`, `Loading`, `Loaded`.

Code example screen shot.

C#
// Copyright 2016 Esri.
// 
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific 
// language governing permissions and limitations under the License.

using Esri.ArcGISRuntime;
using Esri.ArcGISRuntime.Mapping;
using System.Threading;

namespace ArcGISRuntime.WPF.Samples.AccessLoadStatus
{
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        name: "Access load status",
        category: "Map",
        description: "Determine the map's load status which can be: `NotLoaded`, `FailedToLoad`, `Loading`, `Loaded`.",
        instructions: "The load status of the map will be displayed as the sample loads.",
        tags: new[] { "LoadStatus", "Loadable pattern", "Map" })]
    public partial class AccessLoadStatus
    {
        public AccessLoadStatus()
        {
            InitializeComponent();

            // Create the UI, setup the control references and execute initialization 
            Initialize();
        }

        private void Initialize()
        {
            // Create new Map with basemap
            Map myMap = new Map(Basemap.CreateImagery());

            // Register to handle loading status changes
            myMap.LoadStatusChanged += OnMapsLoadStatusChanged;

            // Provide used Map to the MapView
            MyMapView.Map = myMap;
        }

        private void OnMapsLoadStatusChanged(object sender, LoadStatusEventArgs e)
        {
            // Update the load status information
            Dispatcher.BeginInvoke(
                new ThreadStart(() => 
                LoadStatusLabel.Content = string.Format("Map's load status : {0}", e.Status.ToString())
                ));
        }
    }
}
XAML
<UserControl x:Class="ArcGISRuntime.WPF.Samples.AccessLoadStatus.AccessLoadStatus"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
    <Grid>
        <esri:MapView x:Name="MyMapView" />
        <Border Style="{StaticResource BorderStyle}">
            <Label x:Name="LoadStatusLabel"
                   Content="Map's load status :"
                   HorizontalAlignment="Center"
                   FontWeight="SemiBold" />
        </Border>
    </Grid>
</UserControl>
See Also
Additional Examples
Hyperlink to ExampleDescription
AccessLoadStatusDetermine the map's load status which can be: `NotLoaded`, `FailedToLoad`, `Loading`, `Loaded`.
ApplyScheduledUpdatesApply scheduled updates to a downloaded preplanned map area.
EditAndSyncFeaturesSynchronize offline edits with a feature service.
FeatureLayerSelectionSelect features in a feature layer.
GenerateGeodatabaseGenerate a local geodatabase from an online feature service.
MobileMapSearchAndRouteDisplay maps and use locators to enable search and routing offline using a Mobile Map Package.
SearchPortalMapsFind webmap portal items by using a search term.
ServiceFeatureTableManualCacheDisplay a feature layer from a service using the **manual cache** feature request mode.
TimeBasedQueryQuery data using a time extent.