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
Choose a base branch
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.
@stubailo
Copy link
Contributor

stubailo commented Feb 9, 2015

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

@callmephilip
Copy link
Contributor

@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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@CLAassistant
Copy link

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.

@StorytellerCZ
Copy link
Collaborator

This will need to be re-done and updated. Currently as is is not mergable, also because of CLA not signed.

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

Successfully merging this pull request may close these issues.

None yet

7 participants