Bug fix in intent (lon/lat may be negative)
This commit is contained in:
parent
2d73eb0886
commit
93d13b749a
|
@ -92,8 +92,9 @@ const Map: Component = () => {
|
|||
console.log({ caller: 'Intent receiver', intent });
|
||||
const url = new URL(intent.data);
|
||||
const q = url.search;
|
||||
const [, lat, lon] = q.match(/q=([0-9.]+),([0-9.]+)/);
|
||||
const [, lat, lon] = q.match(/q=([0-9.-]+),([0-9.-]+)/);
|
||||
const zoom = Math.min(18, getState().zoom);
|
||||
console.log({ caller: 'Intent receiver', intent, url, lat, lon, zoom });
|
||||
navigate(
|
||||
`/map/${getState().provider}/${lon}/${lat}/${zoom}/${
|
||||
getState().rotation
|
||||
|
|
Loading…
Reference in New Issue