I'm doing an app on ionic where I want to show the user where the city is. With this code I locate it but I need to show you something for example:
You are in Barranquilla / Cartagena or something like that
Driver:
.controller('CtrlUbi', function($scope) {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$scope.$apply(function() {
$scope.position = position; //Obtenemos info de la localizaicon
console.log(position.coords.latitude);
console.log(position.coords.longitude);
console.log(position)
});
});
}
});