ThemeMaps class
Provides access to the thememap functionality of GeoApps. Can be accessed through the Map.ThemeMaps-property.
export declare class ThemeMaps
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 ThemeMaps class.
Example
An example of the usage:
// Connect as anonymous user to a geoapps environment
geoapps.Initialize("<specified tenant>");
// Add the map to a div with element id `map`
var map = geoapps.AddMap("map", "<mapId>");
// Wait till the map loaded, before starting the baselayers
map.onLoaded.add(() => {
// ThemeMaps
map.ThemeMaps.onLoaded.add(function () {
console.log(map.ThemeMaps.Items);
});
// Activate thememap
map.ThemeMaps.ActivateThememap(<thememapId>);
// Get thememap
map.ThemeMaps.GetThemeMap(themeMapId);
});
Events
| Property | Modifiers | Type | Description |
|---|---|---|---|
| onActivated | readonly | GAEvent<ThemeMapActivatedEventArgs> | Triggers when a thememap is activated |
| onLoaded | readonly | GAEvent<GAEventArgs> | Triggers when the thememaps list is loaded |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| ActiveThememapId | readonly | string | Return the id of the current active thememap |
| Items | readonly | ThemeMap[] | List of available thememaps |
Methods
| Method | Modifiers | Description |
|---|---|---|
| ActivateThememap(thememapId) | Activate another thememap by id | |
| GetThemeMap(themeMapId) | Retrieve a thememap | |
| on(event, eventHandler) | Bind to an event (legacy purposes) |