diff --git a/htdocs/map-google.js b/htdocs/map-google.js index 30738434..5b8220a2 100644 --- a/htdocs/map-google.js +++ b/htdocs/map-google.js @@ -168,6 +168,9 @@ MapManager.prototype.processUpdates = function(updates) { case 'KiwiSDR': case 'WebSDR': case 'OpenWebRX': case 'Stations': case 'Repeaters': marker = new GFeatureMarker(); + // If no symbol or color supplied, use defaults by type + if (!update.location.symbol) update.location.symbol = self.mman.getSymbol(update.mode); + if (!update.location.color) update.location.color = self.mman.getColor(update.mode); break; default: marker = new GSimpleMarker(); @@ -191,9 +194,6 @@ MapManager.prototype.processUpdates = function(updates) { // Apply marker options if (marker instanceof GFeatureMarker) { - // If no symbol or color supplied, use defaults by type - if (!update.location.symbol) update.location.symbol = self.mman.getSymbol(update.mode); - if (!update.location.color) update.location.color = self.mman.getColor(update.mode); marker.setMarkerOptions({ symbol : update.location.symbol, color : update.location.color diff --git a/htdocs/map-leaflet.js b/htdocs/map-leaflet.js index 994a498c..608b49f0 100644 --- a/htdocs/map-leaflet.js +++ b/htdocs/map-leaflet.js @@ -436,7 +436,10 @@ MapManager.prototype.processUpdates = function(updates) { break; case 'KiwiSDR': case 'WebSDR': case 'OpenWebRX': case 'Stations': case 'Repeaters': - marker = new GFeatureMarker(); + marker = new LFeatureMarker(); + // If no symbol or color supplied, use defaults by type + if (!update.location.symbol) update.location.symbol = self.mman.getSymbol(update.mode); + if (!update.location.color) update.location.color = self.mman.getColor(update.mode); break; default: marker = new LSimpleMarker(); @@ -462,10 +465,7 @@ MapManager.prototype.processUpdates = function(updates) { marker.setMap(self.mman.isEnabled(update.mode)? map : undefined); // Apply marker options - if (marker instanceof GFeatureMarker) { - // If no symbol or color supplied, use defaults by type - if (!update.location.symbol) update.location.symbol = self.mman.getSymbol(update.mode); - if (!update.location.color) update.location.color = self.mman.getColor(update.mode); + if (marker instanceof LFeatureMarker) { marker.setMarkerOptions({ symbol : update.location.symbol, color : update.location.color