Skip to content

Commit

Permalink
removing ‘as the crow flies’ distance
Browse files Browse the repository at this point in the history
- Apparently we don’t want people commuting on crows,
  or knowing how far crows commute.
  • Loading branch information
techieshark committed Dec 4, 2015
1 parent 87afdde commit cc2502e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ <h1>Results</h1>
<ul class="school-details col-md-6">

{{#if distance}}
<li class="school-distance"><span class="field-label">Distance: </span><p><span class="field-data">About {{distance}} km as the crow flies</span><span class="route-distance"></span></p></li>
<li class="school-distance"><span class="field-label">Distance: </span><p><span class="field-data route-distance"></span></p></li>

{{/if}}

Expand Down
11 changes: 8 additions & 3 deletions js/google_geocoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,14 @@ function callBacker(selector) {
// outputDiv.innerHTML = '';
// origins[i] + ' to ' + destinations[j]
var results = response.rows[0].elements;
outputDiv.html(', or via roads: '
+ results[0].distance.text.split(' ').join('&nbsp;') + ' in '
+ results[0].duration.text.split(' ').join('&nbsp;') + ' cycling');
if (results[0].status === "ZERO_RESULTS"){
// zip
}
else{
outputDiv.html('Via roads: '
+ results[0].distance.text.split(' ').join('&nbsp;') + ' in '
+ results[0].duration.text.split(' ').join('&nbsp;') + ' cycling');
}
}
};

Expand Down

0 comments on commit cc2502e

Please sign in to comment.