From bb9537bfdfb6874f2c175a0dbd9c389bcc814656 Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Sun, 6 Aug 2023 23:54:37 -0400 Subject: [PATCH] Now using symbols not icons. --- htdocs/mapLeaflet.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/htdocs/mapLeaflet.js b/htdocs/mapLeaflet.js index b65e46d7..c50b3ad6 100644 --- a/htdocs/mapLeaflet.js +++ b/htdocs/mapLeaflet.js @@ -19,9 +19,6 @@ var updateQueue = []; // Web socket connection management, message processing var mapManager = new MapManager(); -// icons cache -var icons = {}; - var query = window.location.search.replace(/^\?/, '').split('&').map(function(v){ var s = v.split('='); var r = {}; @@ -252,18 +249,8 @@ MapManager.prototype.processUpdates = function(updates) { // If new item, create a new marker for it if (!marker) { marker = new LFeatureMarker(); - if (0) { // icons - if (!icons[update.mode]) { - icons[update.mode] = L.icon({ - iconUrl: 'static/gfx/icon-' + update.mode + '.png', - iconSize: [24, 24], - }); - } - marker.setIcon(icons[update.mode]); - } else { // symbols - marker.div = marker.create(); - marker.setIcon(L.divIcon({ html: marker.div, className: 'dummy' })); - } + marker.div = marker.create(); + marker.setIcon(L.divIcon({ html: marker.div, className: 'dummy' })); self.mman.addType(update.mode); self.mman.add(update.callsign, marker);