# Milsymbol Documentation
## Installing
You can download the latest release directly from GitHub if you want to:
https://github.com/spatialillusions/milsymbol/releases/latest
You can also get milsymbol using npm:
```
npm install milsymbol --save
```
AMD, CommonJS, and vanilla environments are supported. The module is always
named 'milsymbol' and in vanilla, a 'ms' global is exported:
```html
<script src="dist/milsymbol.js"></script>
<script>
var symbol = new ms.Symbol("SFG-UCI----D", { size: 30 });
</script>
```
In a framework like [Dojo](https://dojotoolkit.org) you can load milsymbol like
this:
```html
<html>
<body>
<script src="dojo/dojo.js" data-dojo-config="async: true"></script>
<script src="app/milsymbol.js"></script>
<script>
require(["milsymbol"], function(ms) {
var symbol = new ms.Symbol("SFG-UCI----D", { size: 30 });
});
</script>
</body>
</html>
```
This way of loading milsymbol makes it possible to use Dojo from an external
source, like js.arcgis.com.
If you only are using it with local sources or if you are uploading it to ArcGIS
Web AppBuilder, you can rebuild it by running `npm run build-amd`, and now you
can `require(["app/milsymbol"].....` if _milsymbol.js_ is placed in your app
folder. See more about building under [Building milsymbol](#building-milsymbol).
# Creating military unit symbols
Each symbol created with milsymbol is its own object and the properties of the
object can be updated or added after that the symbol object is created. The
symbol object also has methods to provide the symbol in different formats and
to provide information about the created symbol.
All functionality in milsymbol is normally found under the `ms` namespace, but
if you have imported milsymbol to another variable, you will have to use that
instead of `ms`.
## ms.Symbol(_arg1, arg2 ... argN_)
Initiates a new symbol object, where arg1-argN are options objects. If you
provide an argument that isn't an object we will assume that it is the SIDC for
the symbol.
Even if options can be provided or updated after the symbol object is created,
the performance will be better if you provide them directly when you create the
symbol, or to provide no arguments at all, this is because every time you update
some options the symbol will automatically be updated.
```javascript
var symbol = new ms.Symbol("SFG-UCI----D", { size: 30 });
```
Once you have initiated your symbol, you can use different methods to request
rendering of the symbol or get information about the symbol. It is also
possible to chain methods directly to the initiation:
```javascript
var symbol = new ms.Symbol("SFG-UCI----D", { size: 30 }).asSVG();
```
**General options**
It is possible to add any custom options to your options object as well as the
options listed below.
| Option | Type | Default | Description |
| ------ | ------ | ------- | ----------------------- |
| sidc | String | '' | The SIDC for the symbol |
**Modifier options**
The following options are modifiers, text or graphical, that are defined in the
standard documents.
| Option | Type | Default | Description |
| --------------------- | ------ | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| additionalInformation | String | '' | A text modifier for units, equipment, and installations; content is implementation specific. <br/>**Field H** _20 Characters_ |
| altitudeDepth | String | '' | A text modifier for units, equipment, and installations, that displays either altitude flight level, depth for submerged objects; or height of equipment or structures on the ground. <br/>**Field X** _14 Characters_ |
| combatEffectiveness | String | '' | A text modifier for units and installations that indicates unit effectiveness or installation capability. <br/>**Field K** _5 Characters_ |
| commonIdentifier | String | '' | Example: "Hawk" for Hawk SAM system. <br/>**Field AF** |
| country | String | '' | Three letter representing the country. <br/>**Field AC** |
| direction | Number | undefined | At the moment all directions should be in degrees and not in mils. Set to an undefined to remove the direction arrow. <br/>**Field Q** |
| dtg | String | '' | A text modifier for units, equipment, and installations that displays DTG format: DDHHMMSSZMONYYYY or "O/O" for on order. <br/>**Field W** _16 Characters_ |
| engagementBar | String | '' | Engagement bar text, shall be arranged as follows: A:BBB-CC. <br/>**Field AO** |
| engagementType | String | '' | Engagement bar type, should be one of the following "TARGET", "NON-TARGET", or "EXPIRED" |
| equipmentTeardownTime | String | '' | Equipment teardown time in minutes. <br/>**Field AE** |
| evaluationRating | String | '' | A text modifier for units, equipment, and installations that consists of a one-letter reliability rating and a one-number credibility rating.<br/>**Field J** _2 Characters_ |
| guardedUnit | String | '' | During ballistic missile defence, some tracks are designated as guarded by a particular unit. <br/>**Field AQ** _2 Characters_ |
| headquartersElement | String | '' | Example: Tactical Operations Centre put as 'TOC'. <br/>**Field AH** |
| higherFormation | String | '' | A text modifier for units that indicates number or title of higher echelon command (corps are designated by Roman numerals). <br/>**Field M** _21 Characters_ |
| hostile | String | '' | A text modifier for equipment; letters "ENY" denote hostile symbols. <br/>**Field N** _3 Characters_
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
JavaScript中的军事符号_JavaScript_下载.zip (200个子文件)
style.css 832B
.editorconfig 54B
.gitignore 329B
milsymbol-2525d.html 77KB
milsymbol-2525c.html 68KB
index.html 65KB
index.html 65KB
milsymbol-APP6d.html 44KB
milsymbol-APP6b.html 32KB
index.html 7KB
index.html 7KB
index.html 7KB
index.html 4KB
index.html 3KB
index.html 2KB
index.html 2KB
index.html 2KB
milsymbol-2525b-ch2.html 2KB
index.html 2KB
index.html 2KB
ground.js 333KB
tactical-points.js 89KB
control-measure.js 49KB
tactical-points-app6.js 45KB
tactical-points-2525.js 41KB
ground.js 39KB
tactical-points.js 34KB
subsurface.js 32KB
landequipment.js 29KB
landunit.js 29KB
textfields.js 27KB
tactical-points-2525.js 27KB
tactical-points-app6.js 24KB
equipment.js 23KB
sea.js 20KB
air.js 17KB
modifier.js 17KB
space.js 16KB
emergencymanagementsymbols.js 16KB
icon.js 14KB
dismountedindividual.js 14KB
metadata.js 12KB
signalsIntelligence.js 11KB
activites.js 11KB
landinstallation.js 10KB
air.js 9KB
number-sidc.js 9KB
signals-intelligence.js 8KB
sea.js 8KB
subsurface.js 7KB
basegeometry.js 7KB
minewarfare.js 7KB
canvasdraw.js 6KB
ms.js 6KB
sea.js 6KB
symbol.js 6KB
air.js 6KB
metadata.js 6KB
assvg.js 5KB
path2d.js 5KB
stabilityoperations.js 5KB
setoptions.js 4KB
signalsintelligence.js 4KB
sof.js 4KB
getmetadata.js 4KB
directionarrow.js 4KB
subsurface.js 4KB
symbolgeometries.js 4KB
getcolors.js 4KB
letter-sidc.js 3KB
installations.js 3KB
sample-symbol-svgs.js 3KB
cyberspace.js 3KB
statusmodifier.js 3KB
space.js 3KB
affliationdimension.js 3KB
index.esm.js 3KB
landcivilian.js 3KB
engagmentbar.js 2KB
2525b.js 2KB
app.js 2KB
rollup.config.js 2KB
rollup.config.amd.js 2KB
lettersidc.js 2KB
airmissile.js 2KB
number-sidc.js 2KB
numbersidc.js 2KB
iconparts-functions.js 2KB
ascanvas.js 2KB
spacemissile.js 2KB
colormodes.js 2KB
symbol.test.js 2KB
2525b-ch2.js 1KB
ms.test.js 1KB
outline.js 1KB
index.js 1KB
bbox.js 836B
letter-sidc.js 819B
debug.js 786B
isvalid.js 732B
共 200 条
- 1
- 2
资源评论
- 傲雪寒梅201314992024-08-06和我下载不要钱的资源一模一样,感觉有点坑人。 #毫无价值
快撑死的鱼
- 粉丝: 1w+
- 资源: 9150
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功