place: Add boolean read-only property for eating & drinking
Marcus Lundblad
3 years ago
294 | 294 | |
295 | 295 | _getIconName() { |
296 | 296 | return PlaceIcons.getIconForPlace(this); |
297 | } | |
298 | ||
299 | /** | |
300 | * This property is true for places related to eating and/or drinking, | |
301 | * such as restaurants, cafes, pubs and similar | |
302 | */ | |
303 | get isEatingAndDrinking() { | |
304 | return this._osmKey === 'amenity' && | |
305 | ['bar', 'biergarten', 'cafe', 'fast_food', 'food_court', | |
306 | 'restaurant', 'pub'].indexOf(this._osmValue) !== -1; | |
297 | 307 | } |
298 | 308 | |
299 | 309 | toJSON() { |