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

Geolocation should update position #195

Open
ischas opened this issue Jan 4, 2017 · 2 comments
Open

Geolocation should update position #195

ischas opened this issue Jan 4, 2017 · 2 comments

Comments

@ischas
Copy link
Contributor

ischas commented Jan 4, 2017

When active, the geolocation should be updated regularly. (Interval should be configurable.)

@penpendede
Copy link
Member

Pray take a look at http://openlayers.org/en/master/apidoc/ol.Geolocation.html - I'd suggest to use tracking and the change events available.

When it comes to power consumption considerations the trackingOptions parameter (that is documented at https://www.w3.org/TR/geolocation-API/#position_options_interface and can be modified at any given time) comes in handy - more precisely its Boolean component enableHighAccuracy that allows to specify whether high accuracy is needed or not.

High accuracy usually means that the device's GPS/GLONASS/BeiDou component is highly active which can drain battery at quite some rate. If you however rely on an external positioning device this may not be an issue.

As there is no means to detect whether or not an external device is used I'd suggest that while it should be possible to provide enableHighAccuracy via the client's configuration it should also be possible to override this setting by the URL API so that this setting can be overridden without touching any configuration file.

In the future it should be possible to toggle high accuracy via some switch. Said switch may be part of an improved version of the geolocation button or a control of its own - so far I do not have a cool idea how to implement this switch without requiring changes to how the buttonesque controls are implemented.

I'll work on this issue according to the consideration presented above.

@ischas
Copy link
Contributor Author

ischas commented Apr 11, 2017

Configuration for geolocation button should have an optional option like 'precision': [high, low, both] where both means that the precision can be handled on run time, default should be low to keep battery consumption low. In case of both the geolocation button should have three states: off, lowPrecision, highPrecision, in the other cases the button should have two states as is.

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

No branches or pull requests

2 participants