hostel
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
choelzl 2021-08-04 07:49:39 +02:00
parent 253e6f0770
commit eb14dcb12e
Signed by: sora
GPG Key ID: A362EA0491E2EEA0

View File

@ -24,7 +24,7 @@ const is_restauration_type = (t)=>{
} }
const is_attraction_type = (item)=>{ const is_attraction_type = (item)=>{
const arr = ["tourism"]; const arr = ["tourism", "leisure", "place", "amenity"];
return arr.indexOf(item.category)!=-1; return arr.indexOf(item.category)!=-1;
} }
@ -264,7 +264,7 @@ const app = new Vue({
this.debounceSave = _.debounce(this.save_data, 500) this.debounceSave = _.debounce(this.save_data, 500)
this.debounceSearch = {"hotel":_.debounce((q)=>{this.querying.hotel=true;this.search_nominatim(q,(r)=>(r.type=="hotel" || r.type=="hostel")).then((r)=>{this.querying.hotel=false});}, 500), this.debounceSearch = {"hotel":_.debounce((q)=>{this.querying.hotel=true;this.search_nominatim(q,(r)=>(r.type=="hotel" || r.type=="hostel")).then((r)=>{this.querying.hotel=false});}, 500),
"restaurants":_.debounce((q)=>{this.querying.food=true;this.search_nominatim(q,(r)=>(is_restauration_type(r.type))).then((r)=>{this.querying.food=false});}, 500), "restaurants":_.debounce((q)=>{this.querying.food=true;this.search_nominatim(q,(r)=>(is_restauration_type(r.type))).then((r)=>{this.querying.food=false});}, 500),
"places":_.debounce((q)=>{this.querying.place=true;this.search_nominatim(q,(r)=>(true)).then((r)=>{this.querying.place=false});}, 500), "places":_.debounce((q)=>{this.querying.place=true;this.search_nominatim(q,(r)=>(is_attraction_type(r.type))).then((r)=>{this.querying.place=false});}, 500),
"other":_.debounce((q)=>{this.querying.any=true;this.search_nominatim(q,(r)=>(true)).then((r)=>{this.querying.any=false});}, 500), "other":_.debounce((q)=>{this.querying.any=true;this.search_nominatim(q,(r)=>(true)).then((r)=>{this.querying.any=false});}, 500),
"flight":_.debounce((q)=>this.search_flight(q), 500) "flight":_.debounce((q)=>this.search_flight(q), 500)
} }