Do not show speed badge when manually picking a location
This commit is contained in:
parent
1733f80773
commit
1ca9922b1b
@ -26,7 +26,11 @@ export default {
|
|||||||
this.$store.dispatch(
|
this.$store.dispatch(
|
||||||
'setCurrentPosition',
|
'setCurrentPosition',
|
||||||
{
|
{
|
||||||
coords: { latitude: value.latlng.lat, longitude: value.latlng.lng },
|
coords: {
|
||||||
|
latitude: value.latlng.lat,
|
||||||
|
longitude: value.latlng.lng,
|
||||||
|
speed: null,
|
||||||
|
},
|
||||||
timestamp: new Date().getTime(),
|
timestamp: new Date().getTime(),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -98,10 +98,14 @@ export default {
|
|||||||
return this.$store.getters.getLastLocation || {};
|
return this.$store.getters.getLastLocation || {};
|
||||||
},
|
},
|
||||||
currentSpeed() {
|
currentSpeed() {
|
||||||
if (this.hasCenterProvidedByRoute || !this.currentLocation) {
|
if (
|
||||||
|
this.hasCenterProvidedByRoute
|
||||||
|
|| !this.currentLocation
|
||||||
|
|| !this.currentLocation.speed
|
||||||
|
) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return Math.round(this.currentLocation.speed || 0, 0);
|
return Math.round(this.currentLocation.speed, 0);
|
||||||
},
|
},
|
||||||
error() {
|
error() {
|
||||||
const errorCode = this.$store.state.location.error;
|
const errorCode = this.$store.state.location.error;
|
||||||
|
Loading…
Reference in New Issue
Block a user