File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2125,12 +2125,15 @@ function setMarker(data) {
21252125 }
21262126 opts . size = opts . size || sz ;
21272127 opts . size = opts . size * ( opts . scale || 1 ) ;
2128- if ( data . SIDC . length > 12 && / ^ [ A - Z a - z ] { 2 } $ / gm. test ( data . SIDC . substr ( 12 , 2 ) ) ) {
2128+ if ( ! data . flag && data . SIDC . length > 12 && / ^ [ A - Z a - z ] { 2 } $ / gm. test ( data . SIDC . substr ( 12 , 2 ) ) ) {
21292129 var cc = data . SIDC . substr ( 12 , 2 ) . toLowerCase ( ) ;
21302130 opts . country = cc . toUpperCase ( ) ;
21312131 opts . staffComments = emojify ( ":flag-" + cc + ":" ) + " " + ( opts ?. staffComments || "" ) ;
21322132 data . flag = opts . country . toUpperCase ( ) + " " + emojify ( ":flag-" + cc + ":" ) ;
21332133 }
2134+ else if ( / \p{ Emoji} / u. test ( data . flag ) ) {
2135+ opts . staffComments = data . flag + " " + ( opts ?. staffComments || "" ) ;
2136+ }
21342137 if ( data . SIDC . length == 12 && data ?. flag && data . flag . length == 2 ) {
21352138 opts . staffComments = emojify ( ":flag-" + data . flag . toLowerCase ( ) + ":" ) + " " + ( opts ?. staffComments || "" ) ;
21362139 }
@@ -2143,7 +2146,7 @@ function setMarker(data) {
21432146 opts . country = data . flag . toUpperCase ( ) + " " + emojify ( ":flag-" + data . flag . toLowerCase ( ) + ":" ) ;
21442147 }
21452148 }
2146- console . log ( "OPTS" , opts )
2149+ // console.log("OPTS",opts)
21472150 data . speed = opts ?. speed || data ?. speed ; // If SIDC then options.speed can override the speed.
21482151 if ( data ?. speed && ! opts ?. direction ) { opts . direction = data ?. track || data ?. hdg || data ?. heading || data ?. COG || data ?. bearing }
21492152 if ( data . speed == undefined ) { delete data . speed ; }
You can’t perform that action at this time.
0 commit comments