/** * Manage a tree with children. This service can be used in mode 'flush' * (default) or not (mode 'add'). In mode 'flush', each theme, group or group * by layer that you add will replace the previous children's array. In mode * 'add', children will be just pushed in this array. The default state can be * changed by setting the value `gmfTreeManagerModeFlush`, e.g.: * * let module = angular.module('app'); * module.value('gmfTreeManagerModeFlush', false); * * This service's theme is a GmfTheme with only children and a name. * Thought to be the tree source of the gmf layertree directive. * * @class * @param {angular.IScope} $rootScope Angular rootScope. * @param {import('gmf/theme/Themes').ThemesService} gmfThemes gmf Themes service. * @param {import('gmf/options').gmfTreeManagerModeFlush} gmfTreeManagerModeFlush Flush mode active? * @param {import('gmf/layertree/TreeManager').LayertreeTreeManager} gmfTreeManager the tree manager. * @param {import('ngeo/statemanager/Service').StatemanagerService} ngeoStateManager The ngeo statemanager * service. * @ngdoc service * @ngname gmfTreeManager * @hidden */ export function ThemeManagerService($rootScope: angular.IScope, gmfThemes: import("gmf/theme/Themes").ThemesService, gmfTreeManagerModeFlush: import("gmf/options").gmfTreeManagerModeFlush, gmfTreeManager: import("gmf/layertree/TreeManager").LayertreeTreeManager, ngeoStateManager: import("ngeo/statemanager/Service").StatemanagerService): void; export class ThemeManagerService { /** * Manage a tree with children. This service can be used in mode 'flush' * (default) or not (mode 'add'). In mode 'flush', each theme, group or group * by layer that you add will replace the previous children's array. In mode * 'add', children will be just pushed in this array. The default state can be * changed by setting the value `gmfTreeManagerModeFlush`, e.g.: * * let module = angular.module('app'); * module.value('gmfTreeManagerModeFlush', false); * * This service's theme is a GmfTheme with only children and a name. * Thought to be the tree source of the gmf layertree directive. * * @class * @param {angular.IScope} $rootScope Angular rootScope. * @param {import('gmf/theme/Themes').ThemesService} gmfThemes gmf Themes service. * @param {import('gmf/options').gmfTreeManagerModeFlush} gmfTreeManagerModeFlush Flush mode active? * @param {import('gmf/layertree/TreeManager').LayertreeTreeManager} gmfTreeManager the tree manager. * @param {import('ngeo/statemanager/Service').StatemanagerService} ngeoStateManager The ngeo statemanager * service. * @ngdoc service * @ngname gmfTreeManager * @hidden */ constructor($rootScope: angular.IScope, gmfThemes: import("gmf/theme/Themes").ThemesService, gmfTreeManagerModeFlush: import("gmf/options").gmfTreeManagerModeFlush, gmfTreeManager: import("gmf/layertree/TreeManager").LayertreeTreeManager, ngeoStateManager: import("ngeo/statemanager/Service").StatemanagerService); /** * @type {angular.IScope} */ $rootScope_: angular.IScope; /** * @type {import('gmf/theme/Themes').ThemesService} */ gmfThemes_: import("gmf/theme/Themes").ThemesService; /** * @type {import('gmf/options').gmfTreeManagerModeFlush} */ modeFlush: import("gmf/options").gmfTreeManagerModeFlush; /** * @type {import('gmf/layertree/TreeManager').LayertreeTreeManager} */ gmfTreeManager_: import("gmf/layertree/TreeManager").LayertreeTreeManager; /** * @type {import('ngeo/statemanager/Service').StatemanagerService} */ ngeoStateManager_: import("ngeo/statemanager/Service").StatemanagerService; /** * @type {string} */ themeName_: string; /** * Set the current theme name (mode 'flush' only) and add its children. Add * only groups that are not already in the tree. * * @param {import('gmf/themes').GmfTheme} theme A theme object. * @param {boolean} [opt_silent] if true it will be no user message if * the theme should be added but it's already added. */ addTheme(theme: import("gmf/themes").GmfTheme, opt_silent?: boolean): void; /** * @returns {string} The theme name. Will be empty on 'not flush' mode. */ getThemeName(): string; /** * @returns {boolean} true if the theme is loading. */ isLoading(): boolean; /** * @param {?string} themeName wanted theme name. * @param {string} fallbackThemeName fallback theme name. * @param {boolean} [opt_silent] if true notifyCantAddGroups_ is not called. * @param {boolean} [opt_hasPrivateLayers] if true the theme has private layers. * @export */ updateCurrentTheme(themeName: string | null, fallbackThemeName: string, opt_silent?: boolean, opt_hasPrivateLayers?: boolean): void; /** * @param {string} name The new theme name. * @param {boolean} [opt_silent] Don't emit a theme change event, default is false. */ setThemeName(name: string, opt_silent?: boolean): void; /** * Remove all groups. */ removeAll(): void; } export namespace ThemeManagerService { let $inject: string[]; } /** * * */ export type ThemeEventType = string; export namespace ThemeEventType { let THEME_NAME_SET: string; } export default myModule; import angular from 'angular'; /** * @type {angular.IModule} * @hidden */ declare const myModule: angular.IModule;