{"action":"created","issue":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/745","labels_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/745/labels{/name}","comments_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/745/comments","events_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/745/events","html_url":"https://github.com/slightlyoff/ServiceWorker/issues/745","id":104963939,"number":745,"title":"Expose GeoLocation to workers","user":{"login":"joemarini","id":822311,"avatar_url":"https://avatars.githubusercontent.com/u/822311?v=3","gravatar_id":"","url":"https://api.github.com/users/joemarini","html_url":"https://github.com/joemarini","followers_url":"https://api.github.com/users/joemarini/followers","following_url":"https://api.github.com/users/joemarini/following{/other_user}","gists_url":"https://api.github.com/users/joemarini/gists{/gist_id}","starred_url":"https://api.github.com/users/joemarini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joemarini/subscriptions","organizations_url":"https://api.github.com/users/joemarini/orgs","repos_url":"https://api.github.com/users/joemarini/repos","events_url":"https://api.github.com/users/joemarini/events{/privacy}","received_events_url":"https://api.github.com/users/joemarini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-04T20:24:27Z","updated_at":"2015-09-14T18:14:20Z","closed_at":null,"body":"Scenario: SW receives a push event, and my handler wants to check the current geolocation so I can warn the user about a potential nasty weather issue in their area. "},"comment":{"url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/comments/140164131","html_url":"https://github.com/slightlyoff/ServiceWorker/issues/745#issuecomment-140164131","issue_url":"https://api.github.com/repos/slightlyoff/ServiceWorker/issues/745","id":140164131,"user":{"login":"mkruisselbrink","id":5649,"avatar_url":"https://avatars.githubusercontent.com/u/5649?v=3","gravatar_id":"","url":"https://api.github.com/users/mkruisselbrink","html_url":"https://github.com/mkruisselbrink","followers_url":"https://api.github.com/users/mkruisselbrink/followers","following_url":"https://api.github.com/users/mkruisselbrink/following{/other_user}","gists_url":"https://api.github.com/users/mkruisselbrink/gists{/gist_id}","starred_url":"https://api.github.com/users/mkruisselbrink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkruisselbrink/subscriptions","organizations_url":"https://api.github.com/users/mkruisselbrink/orgs","repos_url":"https://api.github.com/users/mkruisselbrink/repos","events_url":"https://api.github.com/users/mkruisselbrink/events{/privacy}","received_events_url":"https://api.github.com/users/mkruisselbrink/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T18:14:20Z","updated_at":"2015-09-14T18:14:20Z","body":"It doesn't sound like you need the actual current geolocation for that usecase? You just want to know if the user is in a specific area, so adding a geofence should be enough for that, at least as it is currently specced. That still has the privacy and security aspects of course. We haven't quite worked out yet what should and shouldn't be allowed with respect to registering geofences from a service worker while there are no clients currently shown.\r\nAlso maybe the list of potential areas is too big to actually register geofences for all of them, so I agree that having a way to get the current position from a service worker could indeed be valuable. I'm not convinced that having a way to watch the current position is something that we want to expose to service workers though. Certainly not if that would mean constantly waking up/keeping up the service worker while somebodies device is moving... There are of course usecases for background location tracking, but I think some kind of API where chrome does the tracking and only passes on a complete track would be a much better API for service workers."}}