Fixing feature symbols.

This commit is contained in:
Marat Fayzullin 2023-09-29 21:12:24 -04:00
parent fa3642bfd9
commit 98aae65abc
2 changed files with 8 additions and 8 deletions

View File

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

View File

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