LoadAsync

Following a call to the CreateFeatureLayerAsync method, LoadAsync loads the new layer on the terrain. This method must be called only when the layer is loaded to the terrain for the first time. Use the Refresh method to reload a layer that was already loaded.

This method executes asynchronously, immediately returning an ITerraExplorerAsync80, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync80 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).

If you want to execute synchronously, use Load instead.

Note:    Both Refresh and LoadAsync perform a refresh, overwriting any new features you may have added. If you don’t want to overwrite new features, call Save before refreshing.

 

JavaScript

 

LoadAsync ()

 

C#

 

ITerraExplorerAsync80 LoadAsync ()

 

C++

 

HRESULT LoadAsync(ITerraExplorerAsync80* pVal)

Return Value

ITerraExplorerAsync80

An ITerraExplorerAsync80 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.