[map] Add information on air conditioning in the vehicle
 
	
	
	
	
	
	
	
	
	
	
	
	
	
 |  |  | 
 |  |  |     var span = document.createElement('span'); | 
 |  |  |     span.className = 'vehicleInfo'; | 
 |  |  |      | 
 |  |  |     var text = ''; | 
 |  |  | 	 | 
 |  |  |     var floor_type = ''; | 
 |  |  |     if(vehicleInfo.low === 0) { | 
 |  |  |         setText(span, lang.high_floor_sign); | 
 |  |  |         text += lang.high_floor_sign; | 
 |  |  |         floor_type = lang.high_floor; | 
 |  |  |     } else if(vehicleInfo.low === 1) { | 
 |  |  |         setText(span, lang.partially_low_floor_sign); | 
 |  |  |         text += lang.partially_low_floor_sign; | 
 |  |  |         floor_type = lang.partially_low_floor; | 
 |  |  |     } else if(vehicleInfo.low === 2) { | 
 |  |  |         setText(span, lang.low_floor_sign); | 
 |  |  |         text += lang.low_floor_sign; | 
 |  |  |         floor_type = lang.low_floor; | 
 |  |  |     } | 
 |  |  |      | 
 |  |  |     span.title = lang.tram_type_pattern | 
 |  |  |     var air_conditioning = ''; | 
 |  |  |     if(vehicleInfo.ac) { | 
 |  |  |         text += lang.air_conditioning_sign; | 
 |  |  |         air_conditioning = lang.air_conditioning; | 
 |  |  |     } | 
 |  |  | 	 | 
 |  |  |     setText(span, text); | 
 |  |  | 	 | 
 |  |  |     span.dataset.typeFull = lang.tram_type_pattern | 
 |  |  |         .replace('$num', vehicleInfo.num) | 
 |  |  |         .replace('$type', vehicleInfo.type) | 
 |  |  |         .replace('$floor', floor_type); | 
 |  |  |         .replace('$floor', floor_type) | 
 |  |  |         .replace('$ac', air_conditioning); | 
 |  |  |     span.dataset.typeShort = lang.tram_type_pattern_short | 
 |  |  |         .replace('$num', vehicleInfo.num) | 
 |  |  |         .replace('$type', vehicleInfo.type) | 
 |  |  |         .replace('$floor', floor_type) | 
 |  |  |         .replace('$ac', air_conditioning); | 
 |  |  |     span.dataset.typeAdditional = lang.tram_type_pattern_additional | 
 |  |  |         .replace('$num', vehicleInfo.num) | 
 |  |  |         .replace('$type', vehicleInfo.type) | 
 |  |  |         .replace('$floor', floor_type) | 
 |  |  |         .replace('$ac', air_conditioning); | 
 |  |  |     span.title = span.dataset.typeFull; | 
 |  |  |      | 
 |  |  |     return span; | 
 |  |  | } | 
 
 |  |  | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |         <script src="https://polyfill.io/v3/polyfill.min.js?features=Promise,XMLHttpRequest"></script> | 
 |  |  |         <script type="text/javascript" src="lang_pl.js?v10" id="lang_script"></script> | 
 |  |  |         <script type="text/javascript" src="common.js?v11"></script> | 
 |  |  |         <script type="text/javascript" src="lang_pl.js?v11" id="lang_script"></script> | 
 |  |  |         <script type="text/javascript" src="common.js?v12"></script> | 
 |  |  |         <script type="text/javascript" src="index.js?v8"></script> | 
 |  |  |     </body> | 
 |  |  | </html> | 
 
 |  |  | 
 |  |  |     trip_current: 'current', | 
 |  |  |     trip_next: 'next \u00BB', | 
 |  |  |      | 
 |  |  |     tram_type_pattern: '$num $type ($floor)', | 
 |  |  |     tram_type_pattern: '$num $type ($floor$ac)', | 
 |  |  |     tram_type_pattern_short: '$num $type', | 
 |  |  |     tram_type_pattern_additional: '$floor$ac', | 
 |  |  |     high_floor: 'high floor', | 
 |  |  |     high_floor_sign: '\u2010\u00A0', | 
 |  |  |     high_floor_description: 'high-floor vehicle', | 
 |  |  | 
 |  |  |     low_floor: 'low floor', | 
 |  |  |     low_floor_sign: '\u267F', | 
 |  |  |     low_floor_description: 'low-floor vehicle', | 
 |  |  |     air_conditioning: ', air conditioning', | 
 |  |  |     air_conditioning_sign: '\u2744', | 
 |  |  |     air_conditioning_description: 'has air conditioning unit', | 
 |  |  |      | 
 |  |  |     status_departed: 'Departed', | 
 |  |  |     status_stopped: 'At stop', | 
 
 |  |  | 
 |  |  |     trip_current: 'aktualny', | 
 |  |  |     trip_next: 'następny \u00BB', | 
 |  |  |      | 
 |  |  |     tram_type_pattern: '$num $type ($floor)', | 
 |  |  |     tram_type_pattern: '$num $type ($floor$ac)', | 
 |  |  |     tram_type_pattern_short: '$num $type', | 
 |  |  |     tram_type_pattern_additional: '$floor$ac', | 
 |  |  |     high_floor: 'wysokopodłogowy', | 
 |  |  |     high_floor_sign: '\u2010\u00A0', | 
 |  |  |     high_floor_description: 'pojazd wysokopodłogowy', | 
 |  |  | 
 |  |  |     low_floor: 'niskopodłogowy', | 
 |  |  |     low_floor_sign: '\u267F', | 
 |  |  |     low_floor_description: 'pojazd niskopodłogowy', | 
 |  |  |     air_conditioning: ', klimatyzacja', | 
 |  |  |     air_conditioning_sign: '\u2744', | 
 |  |  |     air_conditioning_description: 'posiada klimatyzację', | 
 |  |  |      | 
 |  |  |     status_departed: 'Odjechał', | 
 |  |  |     status_stopped: 'Na przystanku', | 
 
 |  |  | 
 |  |  | <div id="panel"></div> | 
 |  |  | <script src="https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.forEach,Array.prototype.includes,Array.prototype.map,Element.prototype.classList,Promise,String.prototype.startsWith,XMLHttpRequest,requestAnimationFrame"></script> | 
 |  |  | <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.6.1/build/ol.js" integrity="sha384-2t8P2Mt0pPrLNwMqTljtykP6hpy7mzd34amfOqUYKK74XwsZgukowi3L4lW4bd3K" crossorigin="anonymous"></script> | 
 |  |  | <script tyle="text/javascript" src="lang_pl.js?v10" id="lang_script"></script> | 
 |  |  | <script tyle="text/javascript" src="common.js?v11"></script> | 
 |  |  | <script tyle="text/javascript" src="map.js?v27"></script> | 
 |  |  | <script tyle="text/javascript" src="lang_pl.js?v11" id="lang_script"></script> | 
 |  |  | <script tyle="text/javascript" src="common.js?v12"></script> | 
 |  |  | <script tyle="text/javascript" src="map.js?v28"></script> | 
 |  |  | </body> | 
 |  |  | </html> | 
 
 |  |  | 
 |  |  |         var span = displayVehicle(feature.get('type')); | 
 |  |  |          | 
 |  |  |         additional = document.createElement('p'); | 
 |  |  |         if(span.title) { | 
 |  |  |             setText(additional, span.title); | 
 |  |  |         if(span.dataset.typeShort) { | 
 |  |  |             setText(additional, span.dataset.typeShort); | 
 |  |  |             additional.title = span.dataset.typeAdditional; | 
 |  |  |             span.removeAttribute('title'); | 
 |  |  |         } else { | 
 |  |  |             setText(additional, feature.getId()); | 
 |  |  |         } |