minor on map icons
This commit is contained in:
@@ -24,11 +24,11 @@ client-only(placeholder='Loading...' )
|
|||||||
v-row
|
v-row
|
||||||
//- p.my-4(v-text="$t('common.getting_there')")
|
//- p.my-4(v-text="$t('common.getting_there')")
|
||||||
v-btn.ml-2(icon large :href="routeBy('foot')")
|
v-btn.ml-2(icon large :href="routeBy('foot')")
|
||||||
v-icon(v-text='mdiWalk' color='white')
|
v-icon(v-text='mdiWalk')
|
||||||
v-btn.ml-2(icon large :href="routeBy('bike')")
|
v-btn.ml-2(icon large :href="routeBy('bike')")
|
||||||
v-icon(v-text='mdiBike' color='white')
|
v-icon(v-text='mdiBike')
|
||||||
v-btn.ml-2(icon large :href="routeBy('car')")
|
v-btn.ml-2(icon large :href="routeBy('car')")
|
||||||
v-icon(v-text='mdiCar' color='white')
|
v-icon(v-text='mdiCar')
|
||||||
v-spacer
|
v-spacer
|
||||||
v-btn(@click='$emit("close")' outlined) Close
|
v-btn(@click='$emit("close")' outlined) Close
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ v-row.mb-4
|
|||||||
:hint="$t('event.address_description')")
|
:hint="$t('event.address_description')")
|
||||||
template(v-slot:item="{ item, attrs, on }")
|
template(v-slot:item="{ item, attrs, on }")
|
||||||
v-list-item(v-bind='attrs' v-on='on')
|
v-list-item(v-bind='attrs' v-on='on')
|
||||||
|
v-icon.pr-4(v-text='loadCoordinatesResultIcon(item)')
|
||||||
v-list-item-content(two-line v-if='item')
|
v-list-item-content(two-line v-if='item')
|
||||||
v-list-item-title(v-text='item.name')
|
v-list-item-title(v-text='item.name')
|
||||||
v-list-item-subtitle(v-text='`${item.address}`')
|
v-list-item-subtitle(v-text='`${item.address}`')
|
||||||
@@ -62,7 +63,7 @@ v-row.mb-4
|
|||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mdiMap, mdiMapMarker, mdiPlus, mdiMapSearch, mdiLatitude, mdiLongitude } from '@mdi/js'
|
import { mdiMap, mdiMapMarker, mdiPlus, mdiMapSearch, mdiLatitude, mdiLongitude, mdiRoadVariant, mdiHome, mdiCityVariant } from '@mdi/js'
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import debounce from 'lodash/debounce'
|
import debounce from 'lodash/debounce'
|
||||||
import get from 'lodash/get'
|
import get from 'lodash/get'
|
||||||
@@ -74,13 +75,20 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
mdiMap, mdiMapMarker, mdiPlus, mdiMapSearch, mdiLatitude, mdiLongitude,
|
mdiMap, mdiMapMarker, mdiPlus, mdiMapSearch, mdiLatitude, mdiLongitude, mdiRoadVariant, mdiHome, mdiCityVariant,
|
||||||
place: { },
|
place: { },
|
||||||
placeName: '',
|
placeName: '',
|
||||||
places: [],
|
places: [],
|
||||||
disableAddress: true,
|
disableAddress: true,
|
||||||
addressList: [],
|
addressList: [],
|
||||||
loading: false
|
loading: false,
|
||||||
|
nominatim_osm_type: {
|
||||||
|
way: mdiRoadVariant,
|
||||||
|
house: mdiHome,
|
||||||
|
node: mdiMapMarker,
|
||||||
|
relation: mdiCityVariant,
|
||||||
|
},
|
||||||
|
nominatim_class: ['amenity', 'shop', 'tourism', 'leisure', 'building']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -114,6 +122,12 @@ export default {
|
|||||||
this.places.unshift({ create: true, name: ev.target.value.trim() })
|
this.places.unshift({ create: true, name: ev.target.value.trim() })
|
||||||
}
|
}
|
||||||
}, 100),
|
}, 100),
|
||||||
|
loadCoordinatesResultIcon(item) {
|
||||||
|
if ( this.nominatim_class.includes(item.class)) {
|
||||||
|
return this.mdiHome
|
||||||
|
}
|
||||||
|
return this.nominatim_osm_type[item.type]
|
||||||
|
},
|
||||||
selectPlace (p) {
|
selectPlace (p) {
|
||||||
if (!p) { return }
|
if (!p) { return }
|
||||||
if (typeof p === 'object' && !p.create) {
|
if (typeof p === 'object' && !p.create) {
|
||||||
@@ -209,6 +223,8 @@ export default {
|
|||||||
const name = get(v.namedetails, 'alt_name', get(v.namedetails, 'name'))
|
const name = get(v.namedetails, 'alt_name', get(v.namedetails, 'name'))
|
||||||
const address = v.display_name ? v.display_name.replace(name, '').replace(/^, ?/, '') : ''
|
const address = v.display_name ? v.display_name.replace(name, '').replace(/^, ?/, '') : ''
|
||||||
return {
|
return {
|
||||||
|
class: v.class,
|
||||||
|
type: v.osm_type,
|
||||||
lat: v.lat,
|
lat: v.lat,
|
||||||
lon: v.lon,
|
lon: v.lon,
|
||||||
name,
|
name,
|
||||||
|
|||||||
Reference in New Issue
Block a user