Angular service

NavigatorGeolocation source

Description

Provides defered/promise API service for navigator.geolocation methods

Methods

getCurrentPosition (geoLocationOptions, success, failure) -> HttpPromise

Example

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

Parameters

NameTypeDescription
geoLocationOptions Object

the navigator geolocations options. i.e. { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true }. If none specified, { timeout: 5000 }. If timeout not specified, timeout: 5000 added

success function

success callback function

failure function

failure callback function

Returns

TypeDescription
HttpPromise

Future object