2011-11-29 20 views

Respuesta

8

lo he descubierto, sólo tiene que utilizar ubicación de la ventana y el dispositivo intercepta ...

$('#map').bind('tap', function(){ 
    var url = 'http://maps.google.com/maps?'; 
    url += 'q=[place_name]'; 
    url += '&near='; 
    url += [lat]; 
    url += ','; 
    url += [lon]; 
    url += '&z=15'; 
    // open the native maps app by calling window location 
    window.location = url; 
}); 
+1

Esto funcionó, aunque tuve que agregar maps.google.com a la lista blanca en PhoneGap.plist antes de que funcionara: http://stackoverflow.com/questions/8146231/google-map-wont-show-in- phonegap-ios-app –

+4

no es realmente "nativo" – the0ther

+0

Es casi tan original como todo lo demás en phonegap. – Spencer

Cuestiones relacionadas