service: NavigatorGeolocation

NavigatorGeolocation

Provides defered/promise API service for navigator.geolocation methods

Methods

getCurrentPosition(success, failure) → {HttpPromise}

Parameters:
Name Type Description
success function

success callback function

failure function

failure callback function

Returns:

Future object

Type
HttpPromise
Example
```
 NavigatorGeolocation.getCurrentPosition()
   .then(function(position) {
     var lat = position.coords.latitude, lng = position.coords.longitude;
     .. do something lat and lng
   });
```