How to get from city name in the ngcordova geolocation plugin?

1

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
});
})
    
asked by anonymous 27.09.2015 / 21:21

1 answer

0

Send latitude and longitude to this address, then just treat the return in JSON Reverse Georeferencing

    
29.10.2015 / 17:11