diff --git a/images/position.svg b/images/position.svg
new file mode 100644
index 0000000..249434f
--- /dev/null
+++ b/images/position.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/js/src/mapviewmodel.js b/js/src/mapviewmodel.js
index 50b68bb..c447c30 100644
--- a/js/src/mapviewmodel.js
+++ b/js/src/mapviewmodel.js
@@ -188,6 +188,7 @@ export default class MapViewModel extends ViewModel {
${(pos.speed !== null) ? `${$.getLocaleSpeed(pos.speed, true)}
` : ''}
${(pos.altitude !== null) ? `${$.getLocaleAltitude(pos.altitude, true)}
` : ''}
${(pos.accuracy !== null) ? `${$.getLocaleAccuracy(pos.accuracy, true)}${provider}
` : ''}
+ ${MapViewModel.coordStr(pos.latitude, 0)} ${MapViewModel.coordStr(pos.longitude, 1)}
${stats}
`;
const node = document.createElement('div');
@@ -259,4 +260,26 @@ export default class MapViewModel extends ViewModel {
this.api.updateSize();
}
}
+
+
+ static coordStr(pos, islon)
+ {
+ var ipos = Math.floor(pos);
+ var dec = ((pos - Math.floor(pos)) * 60).toFixed(1);
+ var dir;
+ var pad;
+
+ if (islon)
+ {
+ dir = pos < 0 ? 'W' : 'E';
+ pad = pos < 10 ? '00' : (pos < 100 ? '0' : '');
+ }
+ else
+ {
+ dir = pos < 0 ? 'S' : 'N';
+ pad = pos < 10 ? '0' : '';
+ }
+
+ return pad + ipos + '° ' + (dec < 10 ? '0' : '') + dec + dir;
+ }
}
diff --git a/lang/en.php b/lang/en.php
index 1f7adcc..371289a 100644
--- a/lang/en.php
+++ b/lang/en.php
@@ -62,6 +62,7 @@ $lang["close"] = "close";
$lang["time"] = "Time";
$lang["speed"] = "Speed";
$lang["accuracy"] = "Accuracy";
+$lang["position"] = "Position";
$lang["altitude"] = "Altitude";
$lang["ttime"] = "Total time";
$lang["aspeed"] = "Average speed";