소스 검색

Add more place icons

Johannes Zellner 8 년 전
부모
커밋
72f77f867f
1개의 변경된 파일과 8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 2
      index.js

+ 8 - 2
index.js

@@ -37,19 +37,25 @@ function findResults(queryString, position, callback) {
         results.forEach(function (r) {
             // icons
             r.icon = 'fa-address-card';
-            if (r.type === 'restaurant') r.icon = 'fa-utensils';
+            if (r.type === 'fast_food' || r.type === 'restaurant') r.icon = 'fa-utensils';
             if (r.type === 'doctors') r.icon = 'fa-user-md';
+            if (r.type === 'beach') r.icon = 'fa-umbrella-beach';
             if (r.type === 'dentist') r.icon = 'fa-tooth';
             if (r.type === 'car') r.icon = 'fa-car';
+            if (r.type === 'playground') r.icon = 'fa-child';
+            if (r.type === 'recreation_ground') r.icon = 'fa-running';
+            if (r.type === 'sports_centre' || r.type === 'pitch') r.icon = 'fa-futbol';
             if (r.type === 'bicycle-rental') r.icon = 'fa-bicycle';
             if (r.type === 'school') r.icon = 'fa-graduation-cap';
+            if (r.type === 'post_box' || r.type === 'post_office') r.icon = 'fa-envelope-square';
             if (r.type === 'canal' || r.type === 'river' || r.type === 'water') r.icon = 'fa-water';
             if (r.type === 'station' || r.type === 'stop') r.icon = 'fa-subway';
             if (r.type === 'attraction') r.icon = 'fa-monument';
             if (r.type === 'city' || r.type === 'village' || r.type === 'administrative') r.icon = 'fa-city';
-            if (r.type === 'administrative') r.icon = 'fa-building';
+            if (r.type === 'administrative' || r.class === 'office') r.icon = 'fa-building';
             if (r.type === 'pub' || r.type === 'bar') r.icon = 'fa-beer';
             if (r.type === 'hotel' || r.type === 'hostel') r.icon = 'fa-bed';
+            if (r.type === 'supermarket' || r.type === 'retail') r.icon = 'fa-shopping-cart';
 
             // ensure we have some city if only town is mentioned
             if (!r.address.city) r.address.city = r.address.town;