get additional hash parameters from url
This commit is contained in:
parent
dd03a2d1ff
commit
cb0c5beecf
@ -49,6 +49,14 @@ class UrlManager {
|
|||||||
return hash.length > 1 ? hash.substring(1) : null;
|
return hash.length > 1 ? hash.substring(1) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getHashParameters(): Record<string, string> {
|
||||||
|
return window.location.hash.split("&").reduce((res: Record<string, string>, item: string) => {
|
||||||
|
const parts = item.split("=");
|
||||||
|
res[parts[0]] = parts[1];
|
||||||
|
return res;
|
||||||
|
}, {});
|
||||||
|
}
|
||||||
|
|
||||||
pushStartLayerNameToUrl(startLayerName: string): void {
|
pushStartLayerNameToUrl(startLayerName: string): void {
|
||||||
window.location.hash = startLayerName;
|
window.location.hash = startLayerName;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user