Skip to content

API reference / @zaes/military-symbols/arcgis

@zaes/military-symbols/arcgis ​

@zaes/military-symbols/arcgis — military symbols for the ArcGIS Maps SDK for JavaScript (4.x): a picture marker symbol per symbol, offset so the standard's position sits on the point, and graphics for saved symbols (GeoJSON Points whose properties.military holds the code, amplifiers, size and direction) with the amplifiers measured on the ground as polylines.

Nothing of the SDK is imported: every value is the plain object the SDK autocasts ({type: 'picture-marker', ...}), so this entry adds nothing to a host's bundle beyond itself and works in a MapView and a SceneView alike.

import Graphic from '@arcgis/core/Graphic'; layer.addMany(militaryGraphics(featureCollection).map((g) => new Graphic(g)));

Symbols draw with configureMilitarySymbols' size and display options, as on the other maps.

Interfaces ​

Functions ​

militaryGraphics() ​

ts
function militaryGraphics(data): MilitaryGraphic[];

Graphics for saved symbols: each Point feature with properties.military as its ground amplifiers (AH, AI, AK; drawn first, so under it) and its picture marker, the feature's properties as attributes. Features that are not drawable military symbols are skipped.

Parameters ​

data ​

| { features: readonly MilitaryFeatureLike[]; type?: string; } | readonly MilitaryFeatureLike[]

Returns ​

MilitaryGraphic[]


militaryPictureMarker() ​

ts
function militaryPictureMarker(symbol): 
  | MilitaryPictureMarker
  | undefined;

A symbol as a picture marker symbol. The SDK centres a picture on its point: the offsets move it so the symbol's own position (the octagon's centre, or a headquarters staff's foot) is on the point. Undefined for a code this library does not draw.

Parameters ​

symbol ​

| string | MilitaryProperties

Returns ​

| MilitaryPictureMarker | undefined

Released under the MIT License; the drawings derive from Apache-2.0 work.