From 1e2d27715229efaaaf49a20b294fbfc2aff694a9 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Thu, 27 Jun 2019 23:35:29 +0000 Subject: [PATCH] Use renderMode image for vehicles layer (performance improvement) --- map.js | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/map.js b/map.js index 9089c62..1bbd8c2 100644 --- a/map.js +++ b/map.js @@ -20,7 +20,7 @@ var vehicles_info = {}; var stops_xhr = null; -var stops_ignored = ['131', '744', '1263']; +var stops_ignored = ['131', '744', '1263', '3039']; var stops_style = { 'sb': new ol.style.Style({ image: new ol.style.Circle({ @@ -659,6 +659,9 @@ if(typeof typeName === 'undefined') { typeName = ''; } + if(feature.get('vehicle_type')) { + typeName += ' ' + feature.get('vehicle_type').num; + } addElementWithText(a, 'span', typeName).className = 'small'; a.appendChild(document.createTextNode(' ')); @@ -811,6 +814,7 @@ }); vehicles_layer[type] = new ol.layer.Vector({ source: vehicles_source[type], + renderMode: 'image', }); vehicles_last_update[type] = 0; }); -- Gitblit v1.9.1