I have a mobile app with the ngcodova
geolocation plugin that works only with only lat
and long
what I intend now and that same as giving me lat
and long
me I gave the name of the city how can I do?
Controller
.controller('GeoCtrl', function($scope, $cordovaGeolocation) {
var posOptions = {timeout: 10000, enableHighAccuracy: false};
$cordovaGeolocation
.getCurrentPosition(posOptions)
.then(function (position) {
var lat = position.coords.latitude
var long = position.coords.longitude
alert(lat + " --- " + long);
}, function(err) {
// error
});
})