From 6cb525a2a255aafebc162f80968a2054a0a9798b Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Tue, 29 Jan 2019 14:23:48 +0000 Subject: [PATCH] Add buses data to the map --- map.js | 8 +++++++- map.html | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/map.html b/map.html index 5eec3b6..4530fe0 100644 --- a/map.html +++ b/map.html @@ -18,6 +18,6 @@ <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v5.3.0/build/ol.js" integrity="sha384-iQkGyyH4ioz3m+maM3s9MX1Oq67mACa4B9Z3ovUv3Sv37LJ96fx3WnZfLoiC3Wfl" crossorigin="anonymous"></script> <script tyle="text/javascript" src="lang_pl.js" id="lang_script"></script> <script tyle="text/javascript" src="common.js"></script> -<script tyle="text/javascript" src="map.js"></script> +<script tyle="text/javascript" src="map.js?v2"></script> </body> </html> diff --git a/map.js b/map.js index 10be16a..69cee4a 100644 --- a/map.js +++ b/map.js @@ -90,7 +90,13 @@ } } - var fill = (selected ? '#a00' : '#3399ff'); + var fill = '#F60'; + 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>'; -- Gitblit v1.9.1