$cordovaGeolocation.getCurrentPosition is not workign on latest android version…
var posOptions = {
enableHighAccuracy: true,
timeout: 20000,
maximumAge: 0
};
$cordovaGeolocation.getCurrentPosition(posOptions).then(function (position) {
var lat = position.coords.latitude;
var long = position.coords.longitude;
alert(lat);
var myLatlng = new google.maps.LatLng(lat, long);
var mapOptions = {
center: myLatlng,
zoom: 16,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"), mapOptions);
$scope.map = map;
$scope.map.setCenter(myLatlng);
$ionicLoading.hide();
}, function(err) {
$ionicLoading.hide();
alert(err);
});
its giving error…
I also used cordova.diagnostic to check the permission. all the permission are true…
Help appritiated…