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