missioncommand / mil-sym-js

(RETIRED) MIL-STD-2525 symbol rendering JavaScript library for modern web applications
Apache License 2.0
76 stars 25 forks source link

Missing "AM1" 2525C modifiers #40

Closed yevhenii-username closed 2 years ago

yevhenii-username commented 3 years ago

https://github.com/missioncommand/mil-sym-js/blob/master/web/js/src/armyc2/c2sd/renderer/utilities/ModifiersTG.js Here is exist only AM modifier, but if we looking into 2525c standard on TACGRP.FSUPP.ARS.ARATGT.RTGTGT TACTICAL GRAPHICS FIRE SUPPORT AREAS AREA TARGET RECTANGULAR TARGET Hierarchy: 2.X.4.3.1.1

image

There is exist AM1 modifier

Can you provide info on how to render this type of symbol geometry?

michael-spinelli commented 3 years ago

https://github.com/missioncommand/mil-sym-js/wiki/Developer%27s-Guide#33multipoint-symbology

var mtg = armyc2.c2sd.renderer.utilities.ModifiersTG; modifiers = {}; modifiers[mtg.AM_DISTANCE] = [300,1000];//AM, AN, & X are the only modifiers that are passed as arrays modifiers[mtg.AN_AZIMUTH] = [315]; //The rest of the modifiers are String or Number values. //modifiers[mtg.X_ALTITUDE_DEPTH] = [0];

besLisbeth commented 3 years ago

Hi, @michael-spinelli. Can you, please help me with this type of geometry above? image I send to the lib the central point and try to fill in AM modifier with the array of width number and height number and AN modifier with an angle number but got nothing from lib (and no error either). Other types of geometry which I used in my application works fine, so the problem is not in the algorithm but something is wrong with the modifiers or something like that.

Pseudocode:

point: {latitude: 56.757751434928586, longitude: 28.491410377031954}
AM: [250, 250]
AN: 5, also tried [5]
michael-spinelli commented 3 years ago

You can check the sample here: http://missioncommand.github.io/mil-sym-js/samples/multiPointTester.html

It's possible your scale is too large or your bounding box is not around the symbol.

I added a another case and was able to get Rectangular Target to render without issue: multiPointTester.txt