Reputation: 657
Is there phonegap solution for opening the native maps app centred on a location or with a route displayed?
Upvotes: 6
Views: 6359
Reputation: 657
I figured it out, just use window location and the device intercepts it...
$('#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;
});
Upvotes: 8