diff --git a/projects/context/src/lib/tool/shared/tool.service.ts b/projects/context/src/lib/tool/shared/tool.service.ts index be1eb6e9d9..da84905907 100644 --- a/projects/context/src/lib/tool/shared/tool.service.ts +++ b/projects/context/src/lib/tool/shared/tool.service.ts @@ -20,6 +20,7 @@ export class ToolService { public toolHistory$ = new BehaviorSubject([]); public selectedTool$ = new BehaviorSubject(undefined); private baseUrl: string; + public allowedToolName = []; static register(tool: Tool, cls?: Component) { ToolService.toolDefs[tool.name] = [Object.assign({}, tool), cls]; @@ -31,6 +32,7 @@ export class ToolService { this.tools$.subscribe(rep => this.handleToolsChange()); const tools = Object.keys(ToolService.toolDefs).map(name => { + this.allowedToolName.push(name); return { name: name }; }); this.setTools(tools); diff --git a/projects/core/src/lib/route/route.interface.ts b/projects/core/src/lib/route/route.interface.ts index a2a1db8f01..482a9c4c35 100644 --- a/projects/core/src/lib/route/route.interface.ts +++ b/projects/core/src/lib/route/route.interface.ts @@ -7,4 +7,5 @@ export interface RouteServiceOptions { visibleOnLayersKey?: boolean | string; visibleOffLayersKey?: boolean | string; routingCoordKey?: boolean | string; + toolKey?: boolean | string; } diff --git a/projects/core/src/lib/route/route.service.ts b/projects/core/src/lib/route/route.service.ts index a59d0e2d92..1a44b55cc3 100644 --- a/projects/core/src/lib/route/route.service.ts +++ b/projects/core/src/lib/route/route.service.ts @@ -35,7 +35,8 @@ export class RouteService { searchKey: 'search', visibleOnLayersKey: 'visiblelayers', visibleOffLayersKey: 'invisiblelayers', - routingCoordKey: 'routing' + routingCoordKey: 'routing', + toolKey: 'tool' }; this.options = Object.assign({}, defaultOptions, options); }