This commit is contained in:
Lucas Verney 2018-07-04 17:37:28 +02:00
parent c7a326bd94
commit 35851802d0
2 changed files with 5 additions and 3 deletions

View File

@ -104,7 +104,7 @@ export default {
this.showCompass();
},
watch: {
positionLatLng: (newPositionLatLng) => {
positionLatLng(newPositionLatLng) {
if (!this.map) {
// Map should have been created
return;
@ -122,7 +122,7 @@ export default {
this.isProgrammaticMove = true;
this.map.once('moveend', () => { this.isProgrammaticMove = false; });
}
this.map.setView(this.positionLatLng, this.zoom);
this.map.setView(newPositionLatLng, this.zoom);
}
},
},

View File

@ -21,7 +21,7 @@ export function mockLocation() {
const LNG_MIN = 2.281279;
const LAT_MAX = 48.886123;
const LNG_MAX = 2.392742;
return {
const newLocation = {
coords: {
accuracy: 10, // In meters
latitude: (Math.random() * (LAT_MAX - LAT_MIN)) + LAT_MIN,
@ -29,6 +29,8 @@ export function mockLocation() {
heading: null, // 20 * (Math.PI / 180),
},
};
console.log('New mock location: ', newLocation);
return newLocation;
}
export function storageAvailable(type) {