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

WatchPosition isn't work very well #50

Closed
javc86 opened this issue Nov 23, 2018 · 8 comments
Closed

WatchPosition isn't work very well #50

javc86 opened this issue Nov 23, 2018 · 8 comments

Comments

@javc86
Copy link

javc86 commented Nov 23, 2018

I'm using the watchPosition event but it isn't work very well. I need an actualitations real time for search elements on the street, but watchPosition gives me info each 10 secong. How do I make it faster?

this.watchID = Geolocation.watchPosition(
      position => {
        this.findElmentsByLocation(position.coords);
      },
      error => {
        // eslint-disable-next-line
        console.log('ERROR IN watchPosition: ', error);
      },
      {
        enableHighAccuracy: true,
        distanceFilter: 0,
        interval: 2000,
        fastestInterval: 2000
      }
    );
@Agontuk
Copy link
Owner

Agontuk commented Dec 2, 2018

Looks ok to me, it should give you location every 2 seconds. Try changing the interval and see if it works.

@javc86
Copy link
Author

javc86 commented Dec 5, 2018

@Agontuk I have changed interval option a lot, but it always gives me info each 10 seconds. I don't understand why

@Agontuk
Copy link
Owner

Agontuk commented Dec 10, 2018

I honestly don't know what could be causing this issue. Can you try with different play-service-location versions ?

@rayj10
Copy link

rayj10 commented Dec 13, 2018

@Agontuk the doc still says watchposition is coming instead of done, based on this post it looks like u've done it? I'd like to use it if possible..
thanks alot for the great lib! :D

@Agontuk
Copy link
Owner

Agontuk commented Dec 17, 2018

@rayj10 yes watchPosition feature is available, install the latest version & try it out.

@aaayushsingh
Copy link

+1 on iOS. Even on setting interval to 2000, I don't get location every 2 seconds

@Agontuk
Copy link
Owner

Agontuk commented Aug 24, 2019

interval, fastestInterval is for android only. It does nothing on ios. I'll update the documentation.

@Agontuk
Copy link
Owner

Agontuk commented Oct 8, 2019

Closing due to inactivity, feel free to open new issue if it persists. Also try with the newer version.

@Agontuk Agontuk closed this as completed Oct 8, 2019
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

No branches or pull requests

4 participants