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

Incorrect amplifiers for symbol Air Corridor #48

Closed ivanKyka closed 2 years ago

ivanKyka commented 2 years ago

Hi @michael-spinelli

When I'm trying to render symbol AirCorridor, I can't set min and max alt by setting amplfiers X and X1 as in standart MIL-STD-2525C. In library that fields defined as H, H1 instead X, X1. Can you set that amplifiers in accordance to standard, or explain me how I can fix that problem?

image

michael-spinelli commented 2 years ago

It should work. Are you doing something like this?

var mtg = armyc2.c2sd.renderer.utilities.ModifiersTG; modifiers = {}; modifiers[mtg.AM_DISTANCE] = [1000]; modifiers[mtg.X_ALTITUDE_DEPTH] = [50,400];

image

ivanKyka commented 2 years ago

Thanks for the quick reply!

As I understand, instead using pairt of params (X, X1) I must use X_ALTITUDE_DEPTH with two values into array?

Is it possible to change measure units to meters?

michael-spinelli commented 2 years ago

If you set H & H1 instead of using X, you can set the strings to whatever you want and the renderer won't mess with the values.

modifiers[mtg.H_ADDITIONAL_INFO_1] = "50m"; modifiers[mtg.H1_ADDITIONAL_INFO_2] = "400m";

image

ivanKyka commented 2 years ago

Thanks for you help. I'll try this one