Improved www.ttss.krakow.pl
Jacek Kowalski
2019-07-06 510c11de99e5958fcb57057660eb8e7a8cf5437f
map.js
@@ -94,7 +94,7 @@
   
   this._content = document.createElement('div');
   this._element.appendChild(this._content);
};
}
Panel.prototype = {
   _element: null,
   _hide: null,
@@ -276,11 +276,12 @@
      fill = '#922';
   }
   
   var image = '<svg xmlns="http://www.w3.org/2000/svg" height="30" width="20"><polygon points="10,0 20,23 0,23" style="fill:'+fill+';stroke:'+color_type+';stroke-width:3" /></svg>';
   var image = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="30"><polygon points="10,0 20,23 0,23" style="fill:'+fill+';stroke:'+color_type+';stroke-width:3"/></svg>';
   
   vehicle.setStyle(new ol.style.Style({
      image: new ol.style.Icon({
         src: 'data:image/svg+xml;base64,' + btoa(image),
         imgSize: [20,30],
         rotation: Math.PI * parseFloat(vehicle.get('heading') ? vehicle.get('heading') : 0) / 180.0,
      }),
      text: new ol.style.Text({
@@ -591,6 +592,8 @@
   }
   // Vehicle
   else if(ttss_types.includes(type)) {
      styleVehicle(feature, true);
      var span = displayVehicle(feature.get('vehicle_type'));
      
      additional = document.createElement('p');
@@ -606,8 +609,6 @@
      
      vehicleTable(feature, tbody);
      vehiclePath(feature);
      styleVehicle(feature, true);
   }
   // Stop or stop point
   else if(['s', 'p'].includes(type)) {
@@ -709,7 +710,7 @@
function listFeatures(features) {
   var div = document.createElement('div');
   
   if(features.length == 0) {
   if(features.length === 0) {
      addParaWithText(div, lang.no_results);
      return div;
   }
@@ -909,8 +910,6 @@
      });
      vehicles_last_update[type] = 0;
   });
   ol.style.IconImageCache.shared.setSize(512);
   
   geolocation_feature = new ol.Feature({
      name: '',