spatialillusions / milsymbol

Military Symbols in JavaScript
www.spatialillusions.com/milsymbol
MIT License
544 stars 133 forks source link

MIL SYMBOL 2525 Country attribute not defined #227

Closed guvenmurat closed 1 year ago

guvenmurat commented 5 years ago

Rendering a set of symbols in D3 (object 'd' is the nodes collection of a graph) with links between the objects. Want to display all the applicable attributes around the entity in their correct position. Country is not rendering. In my dataset, I have the object's SIDC and its allegiance. The SIDC does have the country code that matches the allegiance

My line of code is d.symbol = new ms.Symbol(d.sidc, { size: 25, uniqueDesignation:d.name, dtg:d.dlm, location:d.MGRS,altitudeDepth:d.altitude,country:d.allegiance});

The symbol renders without the country. Further analysis, the error in the console log is ReferenceError: Country is not defined

BaaltRodrigo commented 4 years ago

I just test the country attribute like this:

var foo = new ms.Symbol(sidc, {country: countryCode})

Having no reference errors with countryCodes of length 2 and 3

The next things I'm going to say are using MIL-STD-2525C (25C from now) If my memory does not play me tricks, 25C has no modifiers fields to display a country code around the symbol. But, the country code has his place on sidc

g. Positions 13 and 14, country code, identifies the country with which a symbol is associated. Country code identifiers are listed in ISO 3166-1.

With this, you can do sort of relations within symbols and as far I checked it, you can place the option country without any problems. It just does not display because has no space to be displayed.

spatialillusions commented 1 year ago

You are correct that milsymbol does not support showing country codes. You can read about all the supported options in the documentation. If you want to have support for showing country codes from SIDC, please provide a patch, otherwise the current development will focus on D versions of the standards with number based SIDC.