changed directions to walking / public transport

This commit is contained in:
Martin Donnelly 2018-10-11 17:11:36 +01:00
parent 8f4068ac57
commit a58378fe20
2 changed files with 12 additions and 3 deletions

View File

@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
const CACHE_VERSION = { 'version': '0.0.810' }; const CACHE_VERSION = { 'version': '0.0.811' };
const PRECACHE = `jubileeData-${CACHE_VERSION.version}`; const PRECACHE = `jubileeData-${CACHE_VERSION.version}`;
const RUNTIME = 'runtime'; const RUNTIME = 'runtime';

View File

@ -65,6 +65,15 @@ const TrafficModel = Backbone.Model.extend({
if (!this.has('latlong')) if (!this.has('latlong'))
return; return;
const myCoords = { 'home': {
'lat':51.490002, 'long':-0.140245
},
'work':{
'lat':51.5084707, 'long':-0.068798
} };
// 55.872407, -3.549003 // 55.872407, -3.549003
// const latlong = { 'lat':latitude, 'lon':longitude }; // const latlong = { 'lat':latitude, 'lon':longitude };
@ -72,14 +81,14 @@ const TrafficModel = Backbone.Model.extend({
this.set('dest', 'Work'); this.set('dest', 'Work');
mode = 1; mode = 1;
qs = { qs = {
'olat': latlong.lat, 'olon': latlong.lon, 'dlat': 55.872407, 'dlon': -3.549003 'olat': latlong.lat, 'olon': latlong.lon, 'dlat': myCoords.work.lat, 'dlon': myCoords.work.long
}; };
} }
else if (((hour >= 17) && (hour <= 19)) || override) { else if (((hour >= 17) && (hour <= 19)) || override) {
mode = 1; mode = 1;
this.set('dest', 'Home'); this.set('dest', 'Home');
qs = { qs = {
'olat': latlong.lat, 'olon': latlong.lon, 'dlat': 55.942673, 'dlon': -4.556334 'olat': latlong.lat, 'olon': latlong.lon, 'dlat': myCoords.home.lat, 'dlon': myCoords.home.long
}; };
} }
const lastUpdate = time - (this.get('time') || 0); const lastUpdate = time - (this.get('time') || 0);