Latitude and longitude in ionc


#1

latitude and longitude is not getting for all devices in ionc

var posOptions = {timeout: 10000, enableHighAccuracy: true};
$cordovaGeolocation.getCurrentPosition(posOptions );

	.then(function (position) {
	  lat  = position.coords.latitude
	  long = position.coords.longitude
	
	 
	}, function(err) {
	  console.log(err)  
	});

var watchOptions = {timeout : 3000, enableHighAccuracy: false};
var watch = $cordovaGeolocation.watchPosition(watchOptions);

watch.then(
	null,  
		
	function(err) {
		 console.log(err)  
	}, 
		
	function(position) {
		lat  = position.coords.latitude
		long = position.coords.longitude
		Console.log(lat + '' + long)
	}
);

watch.clearWatch();