Skip to main content

@mapgear/geoapps > GeoApps

GeoApps class

The GeoApps class provides access to all map-related configuration and settings

Signature:
export declare class GeoApps 

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 GeoApps class.

Example

To use the GeoApps object, initialization is required. Below is an example how to initialize the GeoApps-object:

// Connect to GeoApps as anonymous user
geoapps.Initialize("<tenantUrl>");

// Connect to GeoApps as an authenticated user with a token
geoapps.Initialize("<tenantUrl>", {
authenticate: "token",
token: "<token>"
});

Events

PropertyModifiersTypeDescription
onAuthenticationChangedreadonlyGAEvent<GAEventArgs>Triggers when the authentication method of the map has been changed (e.g. the user logged in / out)

Properties

PropertyModifiersTypeDescription
AppsreadonlyAppsGet access to the Apps methods
CurrentUserreadonlyUserRetrieve information about the current user. If no authentication is set or the user is not authorized correctly, null is returned
IsInitializedreadonlybooleanWhether GeoApps has been initialized
MailreadonlyMailGet access to the email methods
TenantUrlreadonlystringRetrieve the current tenant url used by GeoApps

Methods

MethodModifiersDescription
AddApp(name, appId, current)Add a GeoApps app
AddMap(target, mapId, workpaceId)Add a map to the specified target
AddMap2(target, mapId, workpaceId)Add a map to the specified target
AddSmartList(id)Initializes a new SmartList object
AddSmartSearch(id, options)Initializes a new SmartSearch object
GetApp(name)Retrieve the app-object specified by the id that is used
GetCurrentApp()Provides access to the current loaded app. This method can be used with the GeoApps CLI and when the app is imported within GeoApps, which passes automatically the current configured app. Using this property instead of AddApp() avoids a static configuration of the app id.
GetMap(target)Retrieve the GeoApps map-object specified by the id that is used
Initialize(tenantUrl, options)Initialize the GeoApps object in the current scope
RemoveApp(name)Removes the GeoApps app-object
RemoveMap(target)Removes the GeoApps map-object from a specified target element
UpdateAuthentication(type, token)Update authentication, for instance when a user later logged on after map initialization