Commit fa1eec1e9c9f18f6a0783b2c0d3fca4e162c72d8
1 parent
8e5e3509af
Exists in
master
add vendor
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
vendor/cordovaGeolocationModule.min.js
... | ... | @@ -0,0 +1 @@ |
1 | +var cordovaGeolocationModule=angular.module("cordovaGeolocationModule",[]);cordovaGeolocationModule.constant("cordovaGeolocationConstants",{apiVersion:"1.0.0",cordovaVersion:">=3.4.0"});cordovaGeolocationModule.factory("cordovaGeolocationService",["$rootScope","$log","cordovaGeolocationConstants",function(e,t,n){return{apiVersion:function(){t.debug("cordovaGeolocationService.apiVersion.");return n.apiVersion},cordovaVersion:function(){t.debug("cordovaGeolocationService.cordovaVersion.");return n.cordovaVersion},checkGeolocationAvailability:function(){t.debug("cordovaGeolocationService.checkGeolocationAvailability.");if(!navigator.geolocation){t.warn("Geolocation API is not available.");return false}return true},getCurrentPosition:function(n,r,i){t.debug("cordovaGeolocationService.getCurrentPosition.");if(!this.checkGeolocationAvailability()){return}navigator.geolocation.getCurrentPosition(function(t){e.$apply(n(t))},function(t){e.$apply(r(t))},i)},watchPosition:function(n,r,i){t.debug("cordovaGeolocationService.watchPosition.");if(!this.checkGeolocationAvailability()){return}return navigator.geolocation.watchPosition(function(t){e.$apply(n(t))},function(t){e.$apply(r(t))},i)},clearWatch:function(e){t.debug("cordovaGeolocationService.clearWatch.");if(!this.checkGeolocationAvailability()){return}navigator.geolocation.clearWatch(e)}}}]) | |
0 | 2 | \ No newline at end of file |