| | |
| | | if(query === this.query) return; |
| | | this.query = query; |
| | | |
| | | if(query === '') { |
| | | deleteChildren(this.results); |
| | | return; |
| | | } |
| | | |
| | | var features = []; |
| | | stops_type.forEach(function(stop_type) { |
| | | if(stop_type.substr(0,1) === 'p') return; |
| | |
| | | if(vehicle_feature) { |
| | | vehicles_source[prefix].removeFeature(vehicle_feature); |
| | | if(feature_clicked && feature_clicked.getId() === vehicle_feature.getId()) { |
| | | featureClicked(); |
| | | panel.close(); |
| | | } |
| | | } |
| | | continue; |
| | |
| | | function listFeatures(features) { |
| | | var div = document.createElement('div'); |
| | | |
| | | if(features.length == 0) { |
| | | addParaWithText(div, lang.no_results); |
| | | return div; |
| | | } |
| | | |
| | | addParaWithText(div, lang.select_feature); |
| | | |
| | | var feature, p, a, full_type, typeName; |
| | |
| | | var feature = features[0]; |
| | | |
| | | if(features.length > 1) { |
| | | featureClicked(); |
| | | panel.show(listFeatures(features)); |
| | | return; |
| | | } |