Skip to main content

@mapgear/geoapps > App

App class

Provides access to the app that is initialized in the UI.

Signature:
export declare class App 

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the App class.

Example

The following example shows how to retrieve an App:

// Connect as anonymous user to a geoapps environment
geoapps.Initialize("<specified tenant>");

// Load the app into a variable and get the app title
var app = geoapps.AddApp("myapp", "<appId>");

// Wait till the app loaded and get the title
app.onLoaded.add(() => {
console.log(app.Title);
});

Events

PropertyModifiersTypeDescription
onLoadedreadonlyGAEvent<GAEventArgs>Triggers when the app is loaded

Properties

PropertyModifiersTypeDescription
AppIdreadonlystringGets the application Id
AppTypeIdreadonlystringGet the application type Id
NamereadonlystringGets the name of the app
ResourceIdreadonlystringGet the application resource
ScreensreadonlyScreen[]Gets the screens
VersionreadonlystringGet the application version

Methods

MethodModifiersDescription
AddScreen(screen)Add a screen to the app
Get(key)Gets a setting by the specified key
GetScreenById(screenId)Gets screen by screen id
Set(key, value)Add or update a setting