moveTo parameter working if layer is found
This commit is contained in:
parent
cb0c5beecf
commit
e87c0a07a4
4 changed files with 57 additions and 8 deletions
|
@ -49,12 +49,13 @@ class UrlManager {
|
|||
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) => {
|
||||
public getHashParameter(name: string): string | undefined {
|
||||
const parameters = window.location.hash.split("&").reduce((res: Record<string, string>, item: string) => {
|
||||
const parts = item.split("=");
|
||||
res[parts[0]] = parts[1];
|
||||
return res;
|
||||
}, {});
|
||||
return parameters[name];
|
||||
}
|
||||
|
||||
pushStartLayerNameToUrl(startLayerName: string): void {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue