v157 · approximate geolocation
Precision budget
Before you pick a mode, decide how wrong you can afford to be. Choose what you are actually building and this works out the coarsest radius that still gives the right answer, which accuracyMode that implies, and what you are asking the user for if you go finer.
What are you building?
5 m100 m1 km20 km
The shaded band is the range of accuracy that still answers this question correctly.
- Coarsest that works
- —
- Ask for
- —
- If you ask finer
- —
The call you should make
Choose a use case above.
why this matters
A permission prompt is a one-shot question. Asking for precise location on a page that only needed a city is the most common way to get a permanent "block" — and once blocked, the coarse fix you could have used is gone too. Requesting the mode you actually need is not only better for the user; it is the version of the prompt most likely to be granted.