diff options
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/etc/geo.js')
| -rw-r--r-- | StoneIsland/platforms/ios/www/js/lib/etc/geo.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/geo.js b/StoneIsland/platforms/ios/www/js/lib/etc/geo.js index ab1f8372..fac34c1e 100644 --- a/StoneIsland/platforms/ios/www/js/lib/etc/geo.js +++ b/StoneIsland/platforms/ios/www/js/lib/etc/geo.js @@ -6,8 +6,8 @@ var geo = (function(){ } geo.success = function(position){ - var lat_str = as_degrees( position.coords.latitude ) - var lng_str = as_degrees( position.coords.longitude ) + var lat_str = as_degrees( position.coords.latitude || 40.99167 ) + var lng_str = as_degrees( position.coords.longitude || -74.07944 ) $(".latlng").html( lat_str + " " + lng_str ) } @@ -20,14 +20,19 @@ var geo = (function(){ if (n >= 0) s += "+" s += Math.floor(n) + "° " + n = Math.abs(n) n %= 1 n *= 60 - s += Math.floor(n) + "'" + nn = Math.floor(n) + if (nn < 10) nn = "0" + nn + s += nn + "' " n %= 1 n *= 60 - - s += Math.floor(n) + '"' + nn = Math.floor(n) + if (nn < 10) nn = "0" + nn + s += nn + '"' + return s } return geo |
