Improved www.ttss.krakow.pl
Jacek Kowalski
2019-01-31 8a0cf827d834a91a2421a7ee94a8f3a27da24738
map.js
@@ -82,17 +82,21 @@
            color_type = 'orange';
         break;
         case '1':
            color_type = 'blue';
         break;
         case '2':
            color_type = 'green';
         break;
      }
   }
   
   var fill = (selected ? '#a00' : '#3399ff');
   var fill = '#B70';
   if(vehicle.getId().startsWith('b')) {
      fill = '#05B';
   }
   if(selected) {
      fill = '#292';
   }
   
   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:2" /></svg>';
   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>';
   
   return new ol.style.Style({
      image: new ol.style.Icon({
@@ -200,7 +204,7 @@
         }
         
         vehicle.geometry = getGeometry(vehicle);
         vehicle.vehicle_type = parseVehicle(vehicle.id);
         vehicle.vehicle_type = parseVehicle('t' + vehicle.id);
         
         if(!vehicle_feature) {
            vehicle_feature = new ol.Feature(vehicle);
@@ -228,7 +232,7 @@
   
   buses_xhr = $.get(
      ttss_buses_base + '/geoserviceDispatcher/services/vehicleinfo/vehicles'
         + '?positionType=' + ttss_position_type
         + '?positionType=RAW'
         + '&colorType=ROUTE_BASED'
         + '&lastUpdate=' + encodeURIComponent(buses_last_update)
   ).done(function(data) {
@@ -256,7 +260,7 @@
         }
         
         vehicle.geometry = getGeometry(vehicle);
         vehicle.vehicle_type = parseVehicle(vehicle.id);
         vehicle.vehicle_type = parseVehicle('b' + vehicle.id);
         
         if(!vehicle_feature) {
            vehicle_feature = new ol.Feature(vehicle);
@@ -834,6 +838,7 @@
   });
   
   $.when(
      updateVehicleInfo(),
      updateTrams(),
      updateBuses(),
      updateStops(ttss_trams_base, 't'),