Skip to content
This repository has been archived by the owner on Jul 5, 2018. It is now read-only.

Commit

Permalink
Merge pull request #130 from jdlrobson/address149
Browse files Browse the repository at this point in the history
fix geourls for android and safari (bug 38693)
  • Loading branch information
bvibber committed Aug 14, 2012
2 parents 9b1be5a + ff8f3c7 commit df7f1f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions assets/www/android/platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ $('html').addClass('android');
// Android opens a.external externally automatically.

platform.geoUrl = function(lat, lon, address) {
var q = 'geo:' + lat + ',' + lon;
var latlng = lat + ',' + lon;
var q = 'geo:' + latlng;
if (address) {
q += '?q=' + encodeURIComponent(address);
q += '?q=' + latlng + ' (' + encodeURIComponent( address ) + ')';
}
return q;
}
Expand Down
4 changes: 2 additions & 2 deletions assets/www/js/platform-stub.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ window.platform = {
// Google maps links for web & iOS
// on iOS these open in native Maps app
var url = ['http://maps.google.com/maps',
'?ll=', lat, ',', lon];
'?q=', lat, ',', lon ];
if(address) {
url.push('&q=' + encodeURIComponent(address));
url.push( '%20(' + encodeURIComponent( address ) + ')' );
}
return url.join('');
}
Expand Down

0 comments on commit df7f1f5

Please sign in to comment.