Make parseHash function working with negative values
This commit is contained in:
parent
c1ccec9664
commit
d889abc798
|
@ -31,7 +31,7 @@ export const withBaseMapStyle = connect((state) => ({
|
||||||
|
|
||||||
function parseHash(v: string): Viewport | null {
|
function parseHash(v: string): Viewport | null {
|
||||||
if (!v) return null;
|
if (!v) return null;
|
||||||
const m = v.match(/^#([0-9\.]+)\/([0-9\.]+)\/([0-9\.]+)$/);
|
const m = v.match(/^#([0-9\.]+)\/([0-9\.\-]+)\/([0-9\.\-]+)$/);
|
||||||
if (!m) return null;
|
if (!m) return null;
|
||||||
return {
|
return {
|
||||||
zoom: Number.parseFloat(m[1]),
|
zoom: Number.parseFloat(m[1]),
|
||||||
|
|
Loading…
Reference in a new issue