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

additional options not getting used? #13

Open
yoooee opened this issue Sep 9, 2015 · 1 comment
Open

additional options not getting used? #13

yoooee opened this issue Sep 9, 2015 · 1 comment

Comments

@yoooee
Copy link

yoooee commented Sep 9, 2015

When I pass in {timeout:5000}, it doesn't appear to get used...

geolocation.getLocation({timeout:5000}).then(function(data){

}, function(error){
//--- never gets called.
}

@mclise
Copy link

mclise commented Sep 30, 2015

+1
I just needed the timeout option to work, so I added the following after the else block and before the return statement:

        if(opts && opts.timeout && typeof opts.timeout === 'number'){
          $timeout(function(){
            $rootScope.$broadcast('error',geolocation_msgs['errors.location.timeout']);
            $rootScope.$apply(function() {
              deferred.reject(geolocation_msgs['errors.location.timeout']);
            });
          }, opts.timeout);
        }

Seems to be working for me as intended.

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

2 participants