Show raw geolocation error code and message for debugging
This commit is contained in:
parent
89f60e894b
commit
eeeb380686
1 changed files with 1 additions and 6 deletions
|
|
@ -171,12 +171,7 @@
|
|||
el.innerHTML = '<span style="color:#388e3c">📍 Location captured</span>';
|
||||
},
|
||||
err => {
|
||||
const msgs = {
|
||||
1: 'Permission denied — allow location in Safari settings.',
|
||||
2: 'Position unavailable.',
|
||||
3: 'Location request timed out.',
|
||||
};
|
||||
el.innerHTML = `<span style="color:#e53e3e">${msgs[err.code] || err.message}</span>`;
|
||||
el.innerHTML = `<span style="color:#e53e3e">Error ${err.code}: ${err.message}</span>`;
|
||||
},
|
||||
{ timeout: 15000 }
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue