1
0
forked from MTSR/mapserver
mapserver/static/js/compat.js
2019-09-01 12:06:47 +02:00

16 lines
428 B
JavaScript

export function hashCompat(){
if (window.location.hash) {
let match = window.location.hash.match(/^#\/(\d*)\/(\d*)\/(\d*)$/m);
if (match) {
window.location.hash = `#!/map/0/${match[1]}/${match[2]}/${match[3]}`;
}
match = window.location.hash.match(/^#\/(\d*)\/(\d*)\/(\d*)\/(\d*)$/m);
if (match) {
window.location.hash = `#!/map/${match[1]}/${match[2]}/${match[3]}/${match[4]}`;
}
}
}