Updated locations to london locations
This commit is contained in:
parent
e3695aed09
commit
13ac0f1503
11
package-lock.json
generated
11
package-lock.json
generated
@ -3395,6 +3395,7 @@
|
||||
"version": "1.0.5",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
}
|
||||
@ -3457,7 +3458,8 @@
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"delegates": {
|
||||
"version": "1.0.0",
|
||||
@ -3745,12 +3747,14 @@
|
||||
"mime-db": {
|
||||
"version": "1.27.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "2.1.15",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"mime-db": "~1.27.0"
|
||||
}
|
||||
@ -3826,7 +3830,8 @@
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"oauth-sign": {
|
||||
"version": "0.8.2",
|
||||
|
@ -11,7 +11,7 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
const CACHE_VERSION = { 'version': '0.0.808' };
|
||||
const CACHE_VERSION = { 'version': '0.0.809' };
|
||||
const PRECACHE = `jubileeData-${CACHE_VERSION.version}`;
|
||||
const RUNTIME = 'runtime';
|
||||
|
||||
|
@ -79,10 +79,20 @@ const LocationModel = Backbone.Model.extend({
|
||||
'apiKey': 'AIzaSyA7oGP6QS28tTwtT6UzA7hzh0b3MWwMYB8', // for Mapquest, OpenCage, Google Premier
|
||||
'formatter': null // 'gpx', 'string', ...
|
||||
};
|
||||
|
||||
const myCoords = { 'home': {
|
||||
'lat':51.490002, 'long':-0.140245
|
||||
},
|
||||
'work':{
|
||||
'lat':51.5084707, 'long':-0.068798
|
||||
} };
|
||||
|
||||
// rawburn house 51.490002, -0.140245
|
||||
// thomas more 51.5084707,-0.068798
|
||||
const geocoder = NodeGeocoder(options);
|
||||
//55.872407, -3.549003
|
||||
const homeDistance = distance(55.942673, -4.556334, latitude, longitude);
|
||||
const workDistance = distance(55.872407, -3.549003, latitude, longitude);
|
||||
// 55.872407, -3.549003
|
||||
const homeDistance = distance(myCoords.home.lat, myCoords.home.long, latitude, longitude);
|
||||
const workDistance = distance(myCoords.work.lat, myCoords.work.long, latitude, longitude);
|
||||
const atHome = (homeDistance < 0.10);
|
||||
const atWork = (workDistance < 0.10);
|
||||
const atHomeOrWork = (atHome || atWork);
|
||||
@ -95,6 +105,7 @@ const LocationModel = Backbone.Model.extend({
|
||||
|
||||
const newLocation = { homeDistance, workDistance, latitude, longitude, atHome, atWork, atHomeOrWork, timestamp, ll, llFixed, llSix, llShort, moving, latlong, 'city' : '', 'cityCC':'' };
|
||||
|
||||
console.log('homeDistance', homeDistance, 'workDistance:', workDistance);
|
||||
// console.log('>> NewLocation', JSON.stringify(newLocation));
|
||||
// const distanceFromLast = distance(current.latitude, current.longitude, latitude, longitude);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user