From 2632c35998f720580d455b1cc959f25dfa795658 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 11 Feb 2013 13:04:11 +0000 Subject: Fix a bug with unknown locations --- resources/map.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"; -- cgit v1.2.3