Skip to content
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

@cscott
Copy link

@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.

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.
@cscott cscott force-pushed the cscott:improve-geolocation branch from 10a0d36 to 2ca4428 Jan 15, 2015
@stubailo
Copy link
Contributor

@stubailo 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.

Copy link

@patte 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.

Copy link

@dandv dandv replied Apr 27, 2015

Yes, how about a PR against the original package?

This comment has been minimized.

Copy link
Owner Author

@cscott cscott replied Apr 28, 2015

This comment has been minimized.

Copy link
Owner Author

@cscott cscott replied Apr 28, 2015

I submitted the PR three months ago.

@callmephilip
Copy link
Contributor

@callmephilip 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?

This comment has been minimized.

@cscott

cscott Feb 23, 2015
Author

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.

Copy link

@patte 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.

Copy link

@dandv dandv replied Apr 27, 2015

Yes, how about a PR against the original package?

This comment has been minimized.

Copy link
Owner Author

@cscott cscott replied Apr 28, 2015

This comment has been minimized.

Copy link
Owner Author

@cscott cscott replied Apr 28, 2015

I submitted the PR three months ago.

@CLAassistant
Copy link

@CLAassistant CLAassistant commented Oct 7, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.