change feature icons with symbols
This commit is contained in:
parent
301f325cfd
commit
4857286994
|
|
@ -252,13 +252,19 @@ MapManager.prototype.processUpdates = function(updates) {
|
|||
// If new item, create a new marker for it
|
||||
if (!marker) {
|
||||
marker = new LFeatureMarker();
|
||||
if (!icons[update.mode]) {
|
||||
icons[update.mode] = L.icon({
|
||||
iconUrl: 'static/gfx/icon-' + update.mode + '.png',
|
||||
iconSize: [24, 24],
|
||||
});
|
||||
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.setIcon(icons[update.mode]);
|
||||
|
||||
self.mman.addType(update.mode);
|
||||
self.mman.add(update.callsign, marker);
|
||||
marker.addListener('click', function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue