Show raw geolocation error code and message for debugging

This commit is contained in:
Claude 2026-03-18 20:27:16 +00:00
parent 89f60e894b
commit eeeb380686
No known key found for this signature in database

View file

@ -171,12 +171,7 @@
el.innerHTML = '<span style="color:#388e3c">📍 Location captured</span>'; el.innerHTML = '<span style="color:#388e3c">📍 Location captured</span>';
}, },
err => { err => {
const msgs = { el.innerHTML = `<span style="color:#e53e3e">Error ${err.code}: ${err.message}</span>`;
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>`;
}, },
{ timeout: 15000 } { timeout: 15000 }
); );