-
Notifications
You must be signed in to change notification settings - Fork 63
Add support for approximate geolocation #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
For readability as you iterate on this proposal it's okay for this PR to directly change the specification text however to land this change the changes need to be enclosed in the correct candidate additions/corrections/deletions syntax. |
|
@reillyeon if it's ok, let's move this to CR first (i.e., let's not waste time with the ins/dels). We are close to publishing as CR again. |
99d9b03 to
3fa8869
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for approximate location positioning to the Geolocation API specification. It introduces a privacy-preserving alternative to precise location sharing, allowing applications to request coarse-grained location data when high accuracy is not needed.
Key changes:
- Introduces
accuracyModeoption with "precise" (default) and "approximate" values - Adds new "geolocation-approximate" permission alongside existing "geolocation" permission
- Implements separate caching for precise and approximate positions
- Updates permission request flows to allow users to choose between precise and approximate location sharing
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3fa8869 to
8658f5a
Compare
2354ca8 to
d3a4d47
Compare
antosart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments wrt the permission handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove all the "Candidate addition" stuff. We don't need any of that additional markup anymore (but leave the rest of normative text there 😄 ) .
d3a4d47 to
b0d0589
Compare
…sion and override accuracyMode
| algorithm=] given a new {{PermissionDescriptor}} with its | ||
| {{PermissionDescriptor/name}} set to "geolocation". | ||
| </li> | ||
| <li>Let |effectiveAccuracy:AccuracyMode?| be `null`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should somehow make sure that effectiveAccuracy is approximate if in the api call accuracyMode: approximate was passed. I think this step is missing, since here you are just getting the maximum accuracy permission granted by the user. Or am I missing something?
| </p> | ||
| </p>Third-party usage can be selectively enabled by adding the | ||
| [^iframe/allow^]`="geolocation"` or | ||
| [^iframe/allow^]`="geolocation-approximate"` attribute to an [^iframe^] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of explainers-by-googlers/approximate-geolocation#19 and explainers-by-googlers/approximate-geolocation#20 I don't think we can make the policy-controlled feature geolocation-approximate work as expected. I suggest dropping it from this PR and we'll see whether we can fix things later on. WDYT?
This commit introduces the ability for users and developers to request a less precise, privacy-preserving "approximate" location.
Key changes include:
Closes #182
Approximate Geolocation explainer
Preview | Diff