first work on custom aprs icons

This commit is contained in:
Jakob Ketterl
2019-09-18 18:50:48 +02:00
parent c6c4012a36
commit 3e8e0c9224
3 changed files with 42 additions and 14 deletions

View File

@ -107,11 +107,22 @@
});
markers[update.callsign] = marker;
}
var iconOptions = {}
if (update.location.symbol) {
var index = update.location.symbol.index;
var tableId = update.location.symbol.table == '/' ? 0 : 1;
iconOptions.icon = {
url: '/aprs-symbols/aprs-symbols-24-' + tableId + '.png',
size: new google.maps.Size(24, 24),
origin: new google.maps.Point((index % 16) * 24, Math.floor(index / 16) * 24),
anchor: new google.maps.Point(12, 12),
};
}
marker.setOptions($.extend({
position: pos,
map: map,
title: update.callsign
}, getMarkerOpacityOptions(update.lastseen) ));
}, iconOptions, getMarkerOpacityOptions(update.lastseen) ));
marker.lastseen = update.lastseen;
marker.mode = update.mode;
marker.band = update.band;