mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-23 04:28:30 -04:00
Merge branch 'master' of https://github.com/mossroy/evopedia-html5
Conflicts: www/js/app.js
This commit is contained in:
commit
0367e60674
@ -417,7 +417,7 @@ define(function(require) {
|
||||
var distanceFromHereHtml = "";
|
||||
if (title._geolocation && currentCoordinates) {
|
||||
// If we know the current position and the title position, we display the distance and cardinal direction
|
||||
var distanceKm = (currentCoordinates.distance(title._geolocation) * 6371 / 60).toFixed(1);
|
||||
var distanceKm = (currentCoordinates.distance(title._geolocation) * 6371 * Math.PI / 180).toFixed(1);
|
||||
var cardinalDirection = currentCoordinates.bearing(title._geolocation);
|
||||
distanceFromHereHtml = " (" + distanceKm + " km " + cardinalDirection + ")";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user