Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

failure to convert coordinates in the direction

$
0
0

I have an app that takes the coordinates and shows the user the direction in which this, until yesterday worked, without making changes today not converting the direction, but if you are taking the coordinates correctly, know that it can be, this is the code

return -1 Error obtaining geolocation

SDK 4.0.1V2 appcelerator version 4.1.1

function tomarPosicionGps() {
    Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST;
    Ti.Geolocation.distanceFilter = 1;
 
 
 
    var locationCallback = function(e) {
        if (!e.success || e.error)  {
            return;
        }
 
        var longitude = e.coords.longitude;
        var latitude = e.coords.latitude;
        var altitude = e.coords.altitude;
        var heading = e.coords.heading;
        var accuracy = e.coords.accuracy;
        var speed = e.coords.speed;
        var timestamp = e.coords.timestamp;
        var altitudeAccuracy = e.coords.altitudeAccuracy;
        latitudSend = latitude;
        longitudSend = longitude;
 
        setTimeout(function()
        {
 
        },200);
 
        Ti.Geolocation.reverseGeocoder(latitude,longitude,function(evt) {
            if (evt.success) {
                places = evt.places;
                if (places && places.length) {
 
                    place = places[0].address;
                    Ti.Geolocation.removeEventListener('location', locationCallback);
                } else {    
 
                    //VER MENSAJE
                    }
            }
            else { 
                //VER MENSAJE
            }
        });
 
    };
    Ti.Geolocation.addEventListener('location', locationCallback);
 
}

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>