diff --git a/front/src/Url/UrlManager.ts b/front/src/Url/UrlManager.ts index 011efa5a..c6e463e4 100644 --- a/front/src/Url/UrlManager.ts +++ b/front/src/Url/UrlManager.ts @@ -49,6 +49,14 @@ class UrlManager { return hash.length > 1 ? hash.substring(1) : null; } + public getHashParameters(): Record { + return window.location.hash.split("&").reduce((res: Record, item: string) => { + const parts = item.split("="); + res[parts[0]] = parts[1]; + return res; + }, {}); + } + pushStartLayerNameToUrl(startLayerName: string): void { window.location.hash = startLayerName; }