$('#gps_map').live("pageshow", function() {
$('#map_canvas_2').gmap('refresh');
$('#map_canvas_2').gmap('getCurrentPosition', function(position, status) {
    if ( status === 'OK' ) {
        var latlng = new google.maps.LatLng(position.coords.latitude, 
position.coords.longitude)
        $('#map_canvas_2').gmap('get', 'map').panTo(latlng);
        $('#map_canvas_2').gmap('search', { 'location': latlng }, 
function(results, status) {
            if ( status === 'OK' ) {
                $('#from').val(results[0].formatted_address);
            }
        });
    } else {
        alert('Unable to get current position');
    }
});});
This code always fails to get location. I can't see the GPS icon in the 
emulator. I tried setting all possible permissions, tried setting the 
latlong coordinates with geo fix method but nothing works. Is there ANY 
way by which geo location can work on android ?


   I am using 'jquery-ui-map' for an android app. My emulator is Google API 
Level 13 version 3.2. My Javascript code is :

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to