spatialillusions / milsymbol

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

Selecting "set" of symbols with AMD in similar way to ES6 #275

Closed vmbajop closed 1 year ago

vmbajop commented 1 year ago

Passing the sidc 10030100001101000000, the symbol obtained with APP6D is different than obtained with MIL-STD-2525D. Working with AMD, the symbol that it returns by default is 2525-D, needing the symbol from APP6D. Is it possible to select the app6d symbol set using AMD in a similar way to ES-6 as in: "import { ms, std2525c } from '../../index.esm.js'; ms.addIcons(std2525c);"

using app6d instead std2525c, somethis like

require([ "milsymbol" ], function(ms){ ms.addIcons("app6d"); var symbol = new ms.Symbol('SFG-UCI----D',{size:30}); }); ?

spatialillusions commented 1 year ago

If you just require in all of milsymbol you can simply do:

var symbol = new ms.Symbol('SFG-UCI----D',{size:30,standard:"APP6"});