Hide speed badge when setting map center manually
This commit is contained in:
parent
8a52c94fbb
commit
93b0ec340e
@ -15,6 +15,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { DEFAULT_ZOOM } from '@/constants';
|
||||
|
||||
import AddressInput from '@/components/AddressInput.vue';
|
||||
|
||||
export default {
|
||||
@ -23,17 +25,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onManualLocationPicker(value) {
|
||||
this.$store.dispatch(
|
||||
'setCurrentPosition',
|
||||
{
|
||||
coords: {
|
||||
latitude: value.latlng.lat,
|
||||
longitude: value.latlng.lng,
|
||||
speed: null,
|
||||
},
|
||||
timestamp: new Date().getTime(),
|
||||
this.$router.push({
|
||||
name: 'SharedMap',
|
||||
params: {
|
||||
lat: value.latlng.lat,
|
||||
lng: value.latlng.lng,
|
||||
zoom: DEFAULT_ZOOM,
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
},
|
||||
props: {
|
||||
|
@ -101,11 +101,10 @@ export default {
|
||||
if (
|
||||
this.hasCenterProvidedByRoute
|
||||
|| !this.currentLocation
|
||||
|| !this.currentLocation.speed
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
return Math.round(this.currentLocation.speed, 0);
|
||||
return Math.round(this.currentLocation.speed || 0, 0);
|
||||
},
|
||||
error() {
|
||||
const errorCode = this.$store.state.location.error;
|
||||
|
Loading…
Reference in New Issue
Block a user