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(
|
||||
'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(),
|
||||
},
|
||||
);
|
||||
|
@ -98,10 +98,14 @@ export default {
|
||||
return this.$store.getters.getLastLocation || {};
|
||||
},
|
||||
currentSpeed() {
|
||||
if (this.hasCenterProvidedByRoute || !this.currentLocation) {
|
||||
if (
|
||||
this.hasCenterProvidedByRoute
|
||||
|| !this.currentLocation
|
||||
|| !this.currentLocation.speed
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
return Math.round(this.currentLocation.speed || 0, 0);
|
||||
return Math.round(this.currentLocation.speed, 0);
|
||||
},
|
||||
error() {
|
||||
const errorCode = this.$store.state.location.error;
|
||||
|
Loading…
Reference in New Issue
Block a user