aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2013-02-11 13:04:11 +0000
committerChristopher Baines <cbaines8@gmail.com>2013-02-11 13:04:11 +0000
commit2632c35998f720580d455b1cc959f25dfa795658 (patch)
tree0c9dc291c1936d025b90a32d068246270063c206 /resources
parentc0fdf6bf27ed17cdfd46f96aeebd4668409d7574 (diff)
downloadhealth-map-2632c35998f720580d455b1cc959f25dfa795658.tar
health-map-2632c35998f720580d455b1cc959f25dfa795658.tar.gz
Fix a bug with unknown locations
Diffstat (limited to 'resources')
-rw-r--r--resources/map.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/resources/map.js b/resources/map.js
index 347d86e..1298c73 100644
--- a/resources/map.js
+++ b/resources/map.js
@@ -267,7 +267,9 @@ function initMap(self) {
}
function formatDistance(distance) {
- if (distance > 1000) {
+ if (distance == "Unknown") {
+ return distance;
+ } else if (distance > 1000) {
return (distance/1000).toFixed(2) + "km";
} else {
return distance.toFixed(0) + "m";