- Renderer: This is the component that can be used in Java applications to generate the entire MIL-STD-2525 symbol for both icons based symbols and geometric.
- NATO Joint Military Symbology is the NATO standard for military map marking symbols. The icons themselves. MIL-STD-2525B and 2525B Change 1 add a number of other modifiers. Positions of the various graphic modifiers around the symbol (itself field A). MIL-STD-2525B Change 1 fails to specify where to place fields AD, AE, and AF.
Just released milsymbol1.1.0, it add support for all symbols in MIL-STD-2525B and a bunch of minor fixes. Milsymbol now also has some unit tests thanks to a pull created by okwolf. Go to the milsymbol page here or on GitHub to view the full changelog.
Milsymbol is a small library in pure javascript that creates military unit symbols according to MIL-STD-2525 and STANAG APP-6.
Compared to reference figure from MIL-STD-2525C:
Milsymbol summary
Milsymbol supports a lot of different options:
- NATO or US standards (MIL-STD-2525C, MIL-STD-2525D, STANAG APP-6 B, STANAG APP-6 D)
- Filled/Unfilled symbols
- Framed/Unframed symbols
- Text fields
- Movement indicators
- SVG/Canvas output (using SVG or Canvas draw instructions)
- Outlines of symbols
- and much more...
For detailed descriptions of what is possible with milsymbol, see the API documentation under /docs.
Milsymbol can be integrated with most common javascript libraries, such as:
- Angular
- Cesium
- D3
- LeafLet
- Node.js
- Open Layers 3
- and also in ScriptEngine in Java, and QtJSEngine in C++...
Examples of some of the integrations are included with milsymbol.
You can find all documentaion and examples at:http://spatialillusions.com/milsymbol/
Getting started
You can download milsymbol from GitHub, or install it using npm:npm install milsymbol
To create your first symbol you use the symbol method to create a symbol object:
ms.Symbol(SIDC,{options})
To make a symbol for an infantry platoon the syntax would be:
var sym = new ms.Symbol('SFG-UCI----D');
And sym
will now be a symbol object containing information about the size and draw instructions.
But you want something to put on your screen, and since milsymbol provides different ways to draw symbol, using SVG or Canvas, you will have to use the method that provides you with the output you want, so we use asCanvas()
or asSVG()
that returns a canvas element containing the symbol or a XML representation of the SVG:
var canvasElement = sym.asCanvas();
And if you don't want to make it step by step, you can chain it all together like this:
var canvasElement = new ms.Symbol('SFG-UCI----D').asCanvas();
Options you provided to your symbol can change the size of the symbol, define if it should be filled/unfilled, add text information, and much more; you can read more about all properties and methods in the API documentation provided with milsymbol.
The options can be set when you create your symbol:
var sym = new ms.Symbol('SFG-UCI----D',{size:35}).asCanvas();
Or they can be updated at any time using setOptions(options)
:
Your symbol object will also contain information about what offset that should be used to get a correct placement, this information can be retrieved with getAnchor()
and it will return an object with the x and y offset, you will also have access to information about what size the created symbol have and detailed information about colors used.
The library is built on the idea that everything used inside milsymbol should be accessable outside milsymbol so that it is easy to extend the library with custom functionallity.
Technology
Milsymbol uses pure javascript to create SVG, Scalable Vector Graphics, and also has built in for native Canvas support.
- No external dependencies, just one javascript file required
- Super fast, can create 1000 symbols in less than 25 milliseconds (SVG output)
The symbols are created using building blocks defined in the code and no images or fonts are used, this makes it possible to modify almost every aspect of the symbols, such as fill, frame, color, size, stroke width and easily switch between APP6 and 2525 symbology.
To see what is possible with milsymbol use the unit test documents in the docs folder that lists all tabels and figures from the different standards using MilSymbol. (The documents use milsymbol to render every image that you see, look into the code if you want to see how it is done.)
Milsymbol can easily be extended with new functionality and examples of this can be found at: https://github.com/spatialillusions/milsymbol-extensions
Contact
Milsymbol is created and maintained by Måns Beckman
- http://www.spatialillusions.com to see more examples of what milsymbol can be used for
- https://twitter.com/spatialillusion for milsymbol and mapping/military related information
Mil Std 2525b Icons Download
Licensing
MIT, See LICENSE for details.
Even if I'm giving it away for free, I don't mind if you would like to send me some cool company giveaways or unit badges. Just send me an email and and I will provide you with my address.
Tactical Symbols
A tactical symbol displays graphic and textual information about an object at a single geographic position at a particular point in time. The graphic displayed is typically a screen icon with supplemental text and graphics surrounding the icon. In general, the graphic displayed depends on the symbology set a tactical symbol belongs to. This guide covers tactical symbols belonging to the U.S. Department of Defense’s Common Warfighting Symbology set, MIL-STD-2525C.
The tactical symbols Java Web Start demo showcases how tactical symbols appear and behave in a WorldWind based application.
Run the Tactical Symbols Demo.
Overview
This guide shows how to use WorldWind tactical symbols in your application, and is organized into five sections:
Construction
Each symbology set defines a tactical symbol implementation that derives from the TacticalSymbol interface. TacticalSymbol provides an interface to common tactical symbol functionality, and extends the Renderable interface so you can add a TacticalSymbol directly to a RenderableLayer.
To create and display a tactical symbol, create a new instance of a TacticalSymbol implementation appropriate for the desired symbology set, then add it to a RenderableLayer.
We’ve created and displayed a TacticalSymbol representing a friendly Special Operations Forces Drone Aircraft from the MIL-STD-2525 symbology set by creating a MilStd2525TacticalSymbol with the appropriate symbol identifier string. We then added the TacticalSymbol to a RenderableLayer we created. Here’s a screen shot of the result.
MilStd2525TacticalSymbol’s constructor accepts the following parameters:
Symbol Identifier (required)
A string identifier indicating the tactical symbol’s appearance. The format of this identifier depends on the symbol set. In the case of MIL-STD-2525, the symbol identifier is a 15-character alphanumeric symbol identification code (SIDC). The symbol’s shape, fill color, outline color, and icon are all defined by the symbol identifier. In the above example, “SFAPMFQM——A” defines a friendly Special Operations Forces drone aircraft.
Position (required)
The latitude, longitude, and altitude where the symbol is drawn on the globe. In the above example, (34.7327, -117.8347, 1000) places the symbol 1km above sea level and north of Los Angeles.
Modifiers (optional)
An optional list of key-value pairs specifying supplemental graphic and text attributes. This parameter may be null or omitted entirely. The modifiers list extends the symbol attributes already indicated by the symbol identifier. In the case where both the symbol identifier and the modifiers list indicate the same attribute, the modifiers list has priority. The above example omits the modifiers parameter, so the symbol contains only the attributes indicated by its symbol identifier. See Modifiers for more information.
Position
A TacticalSymbol’s position indicates the latitude, longitude, and altitude where the symbol draws its graphic. To position a TacticalSymbol during construction, just specify the desired position parameter. To position a TacticalSymbol after construction, call setPosition with the desired position.
We’ve moved a TacticalSymbol from Los Angeles to Afghanistan, and set its altitude to 3km above sea level. Here’s a screen shot of the result:
A TacticalSymbol’s altitude mode indicates how the altitude component is interpreted. There are three recognized altitude modes:
- WorldWind.ABSOLUTE - altitude is relative to mean sea level
- WorldWind.RELATIVE_TO_GROUND - altitude is relative to ground level
- WorldWind.CLAMP_TO_GROUND - altitude is replaced with ground level
To configure a MilStd2525TacticalSymbol’s altitude mode appropriately for the type of object displayed, just create the symbol as you normally would. During construction, MilStd2525TacticalSymbol configures the altitude mode from information in the symbol identifier.
We’ve created two TacticalSymbols representing air and ground objects. MilStd2525TacticalSymbol identifies each symbol identifier as air and ground, and configures their altitude modes as WorldWind.ABSOLUTE and WorldWind.CLAMP_TO_GROUND, respectively. Here’s a screen shot of the result.
TacticalSymbol provides support for manually configuring the altitude mode. It is usually not necessary to manually configure a TacticalSymbol’s altitude mode unless there’s a need to override the automatically configured mode. To manually configure the altitude mode, call setAltitudeMode with one of the recognized modes.
Modifiers
Modifiers are optional key-value attributes that cause a TacticalSymbol to display supplemental graphic and text around or over the symbol’s graphic. See the MilStd2525TacticalSymbol documentation for a list of supported modifiers. The placement and display of modifiers for MilStd2525TacticalSymbol is defined in the MIL-STD-2525 specification.
To set a TacticalSymbol’s modifiers during construction, specify the modifier keys and their associated values as key-value pairs attached to an AVList.
To set a TacticalSymbol’s modifiers after construction, call setModifier with the modifier key and its associated value. To display a modifier with an implicit value - such the Location modifier - call setModifier with the modifier key and the value true.
We’ve set a TacticalSymbol’s Direction of Movement (heading) and Echelon modifiers. The Direction of Movement is displayed as an arrow extending from the symbol’s ground position and oriented to its heading. The Echelon graphic is displayed above the symbol icon. The Location modifier is displayed as text aligned to the symbol icon’s left side. Here’s a screen shot of the result.
TacticalSymbol provides support for removing existing modifiers. To remove a modifier, call setModifier with the modifier key and the value null. To hide an implicit modifier, such as the the Location modifier, set the appropriate visibility flag on the symbol. For example, to hide the Location modifier, call setShowLocation(false).
Display Options
Size and Opacity
Mil Std 2525b Pdf
TacticalSymbol provides control of its scale and opacity through the TacticalSymbolAttributes interface. The scale is a decimal number greater than 0.0: values less than 1.0 make the symbol smaller, while values greater than 1.0 make the symbol larger. The opacity is a decimal number between 0.0 and 1.0 (inclusive), where 0.0 is completely transparent and 1.0 is completely opaque. The scale and opacity apply to both the symbol graphic and the symbol modifiers.
To set a TacticalSymbol’s size or opacity (or both), create and configure a new TacticalSymbolAttributes, then call setAttributes with the new attribute bundle.
Mil Std 2525b Symbology
Highlighting
TacticalSymbol extends the Highlightable interface, and provides control of its highlighted display parameters through a highlight attribute bundle. This bundle is used to draw the symbol’s graphic and modifiers when a TacticalSymbol’s highlighted state is true.
To highlight a TacticalSymbol, create and configure a new TacticalSymbolAttributes, then call setHighlightAttributes with the new attribute bundle. Finally, call setHighlighted with the value true to highlight the symbol. If your application uses HighlightController, the symbol is automatically highlighted when it’s under the cursor. Note that it is possible to specify both normal and highlight attributes, but it is not necessary to do so.
Decluttering
When many tactical symbols are displayed in the same scene, the scene is likely to become cluttered and difficult to interpret. TacticalSymbol provides two ways to reduce the amount of information it displays in order to reduce clutter: hiding symbol modifiers, and displaying the symbol as a simple dot.
To hide a TacticalSymbol’s graphic or text modifiers (or both) call setShowGraphicModifiers or setShowTextModifiers, respectively, with the value false. The symbol displays its normal frame, fill, and icon, but hides any supplemental graphic or text modifiers.
To display a MilStd2525TacticalSymbol as a simple dot, call setShowFrameAndIcon with the value false. The TacticalSymbolAttributes’ scale indicates the dot’s diameter in screen pixels, and the symbol’s fill color is used as the dot’s interior color. When MilStd2525TacticalSymbol is displayed as a dot, its graphic and text modifiers are not displayed.
Mil Std 2525b Change 2
Modifier Attributes
TacticalSymbol provides control of the font and color used to display text modifiers via the TacticalSymbolAttributes interface. To set the text modifier font or color (or both), call setModifierFont or setModifierMaterial, respectively.
Offline Use
By default, the icons displayed by TacticalSymbol and TacticalPointGraphic are downloaded from an HTTP server at https://worldwind.arc.nasa.gov/milstd2525c/rev1/. When an application cannot access worldwind.arc.nasa.gov, it is necessary to configure these symbols to download their icons from another location. This can be accomplished by deploying an HTTPS server or by using a local ZIP archive.
HTTPS Server
Install an HTTPS server on any machine that is accessible to the client application. Use any server that supports the HTTPS protocol, such as NGINX.
Download the WorldWind MIL-STD-2525 Symbol Icons ZIP archive.
Extract the Symbol Icons ZIP Archive to a publicly accessible folder on the server. Assign global read permission to the folder and its sub-folders. The following steps refer to the extracted folder’s public URL as http://myserver.com/milstd2525/.
Configure WorldWind by adding the following entry to the worldwind.xml configuration file:
Local ZIP Archive
Download the WorldWind MIL-STD-2525 Symbol Icons ZIP archive. Place the archive in a location that is accessible to the application. The following steps refer to the archive’s location as MyApp/milstd2525-symbols.zip, where MyApp is the application root folder.
Configure WorldWind by adding the following entry to the worldwind.xml configuration file:
The file URL specified in this entry may be absolute or it may be relative to the application working directory.