Now using symbols not icons.

This commit is contained in:
Marat Fayzullin 2023-08-06 23:54:37 -04:00
parent 657af576a4
commit bb9537bfdf
1 changed files with 2 additions and 15 deletions

View File

@ -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);