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

Improve Geolocation package. #36

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@cscott

cscott commented Jan 15, 2015

Add the ability to tweak the PositionOptions used for Geolocation, for
instance to use low-accuracy position to save battery on mobile devices.
The options parameter is reactive.

Add a pause feature to temporarily halt position updates, again to
allow better power management on mobile devices. The paused status
is also reactive.

Stop position watcher when there are no dependencies of the location,
so that we automatically save power if (for example) a reactive map
view is not visible.

Improve Geolocation package.
Add the ability to tweak the PositionOptions used for Geolocation, for
instance to use low-accuracy position to save battery on mobile devices.
The options parameter is reactive.

Add a `pause` feature to temporarily halt position updates, again to
allow better power management on mobile devices.  The paused status
is also reactive.

Stop position watcher when there are no dependencies of the location,
so that we automatically save power if (for example) a reactive map
view is not visible.
@stubailo

This comment has been minimized.

Show comment
Hide comment
@stubailo

stubailo Feb 9, 2015

Contributor

Hey, sorry I'm behind on reviewing this. I'll try to get to it this week.

Contributor

stubailo commented Feb 9, 2015

Hey, sorry I'm behind on reviewing this. I'll try to get to it this week.

@patte

This comment has been minimized.

Show comment
Hide comment
@patte

patte Feb 16, 2015

I could really use the pause feature? did you try a pull request to meteor/mobile-packages already?

patte commented on 2ca4428 Feb 16, 2015

I could really use the pause feature? did you try a pull request to meteor/mobile-packages already?

This comment has been minimized.

Show comment
Hide comment
@dandv

dandv Apr 27, 2015

Yes, how about a PR against the original package?

dandv replied Apr 27, 2015

Yes, how about a PR against the original package?

This comment has been minimized.

Show comment
Hide comment
@cscott

cscott Apr 28, 2015

Owner
Owner

cscott replied Apr 28, 2015

This comment has been minimized.

Show comment
Hide comment
@cscott

cscott Apr 28, 2015

Owner

I submitted the PR three months ago.

Owner

cscott replied Apr 28, 2015

I submitted the PR three months ago.

@callmephilip

This comment has been minimized.

Show comment
Hide comment
@callmephilip

callmephilip Feb 17, 2015

Contributor

@cscott: this is definitely something I've been looking for. going to try your branch out while waiting for this PR to land. 👍

Contributor

callmephilip commented Feb 17, 2015

@cscott: this is definitely something I've been looking for. going to try your branch out while waiting for this PR to land. 👍

### Geolocation.setOptions(options)
Provide [PositionOptions](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions) to manage power consumption on mobile devices. The options can be reactive.

This comment has been minimized.

@stubailo

stubailo Feb 23, 2015

Contributor

What does "The options can be reactive." mean in this context?

@stubailo

stubailo Feb 23, 2015

Contributor

What does "The options can be reactive." mean in this context?

This comment has been minimized.

@cscott

cscott Feb 23, 2015

See the simple-map example above. You can call:

var loc = Geolocation.latLng({ enableHighAccuracy: !!Session.get("highAccuracy") });

and the reactive-dependency magic will work to ensure that loc is properly updated if the Session variable changes (or if the location changes, naturally). The watcher that is created behind the scenes will be properly torn down/rebuilt iff it is necessary when this statement is recomputed.

@cscott

cscott Feb 23, 2015

See the simple-map example above. You can call:

var loc = Geolocation.latLng({ enableHighAccuracy: !!Session.get("highAccuracy") });

and the reactive-dependency magic will work to ensure that loc is properly updated if the Session variable changes (or if the location changes, naturally). The watcher that is created behind the scenes will be properly torn down/rebuilt iff it is necessary when this statement is recomputed.

@patte

This comment has been minimized.

Show comment
Hide comment
@patte

patte Feb 16, 2015

I could really use the pause feature? did you try a pull request to meteor/mobile-packages already?

patte commented on 2ca4428 Feb 16, 2015

I could really use the pause feature? did you try a pull request to meteor/mobile-packages already?

This comment has been minimized.

Show comment
Hide comment
@dandv

dandv Apr 27, 2015

Yes, how about a PR against the original package?

dandv replied Apr 27, 2015

Yes, how about a PR against the original package?

This comment has been minimized.

Show comment
Hide comment
@cscott

cscott Apr 28, 2015

Owner
Owner

cscott replied Apr 28, 2015

This comment has been minimized.

Show comment
Hide comment
@cscott

cscott Apr 28, 2015

Owner

I submitted the PR three months ago.

Owner

cscott replied Apr 28, 2015

I submitted the PR three months ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment