Package sec.web.renderer
Class SECWebRenderer
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
sec.web.renderer.SECWebRenderer
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible
- Author:
- Administrator
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.applet.Applet
Applet.AccessibleAppletNested classes/interfaces inherited from class java.awt.Panel
Panel.AccessibleAWTPanelNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic Stringstatic final Stringstatic final doublestatic final Stringstatic final doublestatic final Stringstatic final doublestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final doublestatic final Stringstatic final doublestatic final Stringstatic final doublestatic final Stringstatic final StringFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()static StringGenerateSymbolAreaFillUrl(String clipCoords, String SymbolIDs, int height, int width, int symbolSize) Deprecated.static StringGenerateSymbolAreaFillUrl(Map<String, String> modifiers, ArrayList<ArmyC2.C2SD.Utilities.ShapeInfo> clip) Deprecated.use GenerateSymbolLineFillUrlstatic StringGenerateSymbolLineFillUrl(Map<String, String> modifiers, ArrayList<Point2D> pixels, Rectangle2D clip) Put this here rather than in multipointhandler so that I could get the port info from the single point server.intgets the port number for the singlepoint server.getSinglePointAnchor(String symbolID) Deprecated.byte[]getSinglePointByteArray(String symbolID) Given a symbol code meant for a single point symbol, returns the symbol as a byte array.getSinglePointInfo(String symbolID) Given a symbol code meant for a single point symbol, returns the anchor point at which to display that image based off the image returned from the URL of the SinglePointServer.getSinglePointInfoBatch(String batch) Given a symbol code meant for a single point symbol, returns the anchor point at which to display that image based off the image returned from the URL of the SinglePointServer.voidinit()Initialization method that will be called after the applet is loaded into the browser.Render3dSymbol(String name, String id, String shapeType, String description, String lineColor, String fillColor, String altitudeMode, String controlPoints, String attributes) Creates a 3D symbol to be displayed on some 3D globe surface.static StringRenderMilStd3dSymbol(String name, String id, String symbolCode, String description, String altitudeMode, String controlPoints, String modifiers) Creates a 3D symbol from the MilStd2525B USAS or MIL-STD-2525C to be displayed on a 3D globe surface.RenderSymbol(String id, String name, String description, String symbolCode, String controlPoints, String altitudeMode, double scale, String bbox, String modifiers, int format) Renders all multi-point symbols, creating KML that can be used to draw it on a Google map.RenderSymbol(String id, String name, String description, String symbolCode, String controlPoints, String altitudeMode, double scale, String bbox, String modifiers, int format, int symStd) Renders all multi-point symbols, creating KML that can be used to draw it on a Google map.RenderSymbol2D(String symbolCode, String name, String description, String controlPoints, int pixelWidth, int pixelHeight, String bbox, String modifiers) Renders all multi-point symbols, creating JSON that can be used to draw it on a 2D map.RenderSymbol2D(String id, String name, String description, String symbolCode, String controlPoints, int pixelWidth, int pixelHeight, String bbox, String modifiers, int format) Renders all multi-point symbols, creating KML or JSON for the user to parse and render as they like.RenderSymbol2D(String id, String name, String description, String symbolCode, String controlPoints, int pixelWidth, int pixelHeight, String bbox, String modifiers, int format, int symStd) Renders all multi-point symbols, creating KML or JSON for the user to parse and render as they like.voidsetDefaultSymbologyStandard(int symStd) Let's user choose between 2525Bch2 and 2525C.voidsetLoggingLevel(int level) \ Set minimum level at which an item can be logged.voidsetLoggingLevel(Level level) \ Set minimum level at which an item can be logged.voidsetModifierTextColor(String hexColor) Modifier Text Color will by default match the line color.voidsetTacticalGraphicPointSize(int size) Single Point Tactical Graphics are rendered from font files.voidsetUnitPointSize(int size) Units are rendered from font files.ShouldClipMultipointSymbol(String symbolID) Returns true if we recommend clipping a particular symbol.static StringSymbolDimensionsToJSON(Point2D anchor, Rectangle2D bounds, Dimension2D iconSize) Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stopMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
CYLINDER
- See Also:
-
ORBIT
- See Also:
-
ROUTE
- See Also:
-
POLYGON
- See Also:
-
RADARC
- See Also:
-
POLYARC
- See Also:
-
CAKE
- See Also:
-
TRACK
- See Also:
-
ATTRIBUTES
- See Also:
-
MIN_ALT
- See Also:
-
MAX_ALT
- See Also:
-
RADIUS1
- See Also:
-
RADIUS2
- See Also:
-
LEFT_AZIMUTH
- See Also:
-
RIGHT_AZIMUTH
- See Also:
-
MIN_ALT_DEFAULT
public static final double MIN_ALT_DEFAULT- See Also:
-
MAX_ALT_DEFAULT
public static final double MAX_ALT_DEFAULT- See Also:
-
RADIUS1_DEFAULT
public static final double RADIUS1_DEFAULT- See Also:
-
RADIUS2_DEFAULT
public static final double RADIUS2_DEFAULT- See Also:
-
LEFT_AZIMUTH_DEFAULT
public static final double LEFT_AZIMUTH_DEFAULT- See Also:
-
RIGHT_AZIMUTH_DEFAULT
public static final double RIGHT_AZIMUTH_DEFAULT- See Also:
-
ERR_ATTRIBUTES_NOT_FORMATTED
-
DEFAULT_ATTRIBUTES
- See Also:
-
-
Constructor Details
-
SECWebRenderer
public SECWebRenderer()
-
-
Method Details
-
init
public void init()Initialization method that will be called after the applet is loaded into the browser. -
getManifestInfoString
-
setLoggingLevel
\ Set minimum level at which an item can be logged. In descending order: OFF = Integer.MAX_VALUE Severe = 1000 Warning = 900 Info = 800 Config = 700 Fine = 500 Finer = 400 Finest = 300 All = Integer.MIN_VALUE Use like SECWebRenderer.setLoggingLevel(Level.INFO); or Use like SECWebRenderer.setLoggingLevel(800);- Parameters:
level- java.util.logging.level
-
setLoggingLevel
public void setLoggingLevel(int level) \ Set minimum level at which an item can be logged. In descending order: OFF = Integer.MAX_VALUE Severe = 1000 Warning = 900 Info = 800 Config = 700 Fine = 500 Finer = 400 Finest = 300 All = Integer.MIN_VALUE Use like SECWebRenderer.setLoggingLevel(Level.INFO); or Use like SECWebRenderer.setLoggingLevel(800);- Parameters:
level- int
-
setDefaultSymbologyStandard
public void setDefaultSymbologyStandard(int symStd) Let's user choose between 2525Bch2 and 2525C. Ideally, set only once at startup. 2525Bch2 = 0, 2525C = 1.- Parameters:
symStd-
-
setTacticalGraphicPointSize
public void setTacticalGraphicPointSize(int size) Single Point Tactical Graphics are rendered from font files. The font size you specify here determines how big the symbols will be rendered. This should be set once at startup.- Parameters:
size-
-
setUnitPointSize
public void setUnitPointSize(int size) Units are rendered from font files. The font size you specify here determines how big the symbols will be rendered. This should be set once at startup.- Parameters:
size-
-
setModifierTextColor
Modifier Text Color will by default match the line color. This will override all modifier text color.- Parameters:
hexColor-
-
RenderSymbol
public String RenderSymbol(String id, String name, String description, String symbolCode, String controlPoints, String altitudeMode, double scale, String bbox, String modifiers, int format) Renders all multi-point symbols, creating KML that can be used to draw it on a Google map. Multipoint symbols cannot be draw the same at different scales. For instance, graphics with arrow heads will need to redraw arrowheads when you zoom in on it. Similarly, graphics like a Forward Line of Troops drawn with half circles can improve performance if clipped when the parts of the graphic that aren't on the screen. To help readjust graphics and increase performance, this function requires the scale and bounding box to help calculate the new locations.- Parameters:
id- A unique identifier used to identify the symbol by Google map. The id will be the folder name that contains the graphic.name- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.symbolCode- A 15 character symbolID corresponding to one of the graphics in the MIL-STD-2525CcontrolPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1[,z1] [xn,yn[,zn]]..."altitudeMode- Indicates whether the symbol should interpret altitudes as above sea level or above ground level. Options are "clampToGround", "relativeToGround" (from surface of earth), "absolute" (sea level), "relativeToSeaFloor" (from the bottom of major bodies of water).scale- A number corresponding to how many meters one meter of our map represents. A value "50000" would mean 1:50K which means for every meter of our map it represents 50000 meters of real world distance.bbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." Not required but can speed up rendering in some cases. example: "-50.4,23.6,-42.2,24.2"modifiers- A JSON string representing all the possible symbol modifiers represented in the MIL-STD-2525C. Format of the string will be {"modifiers": {"attributeName":"value"[,"attributeNamen":"valuen"]...}} The quotes are literal in the above notation. Example: {"modifiers": {"quantity":"4","speed":"300","azimuth":[100,200]}}format- An enumeration: 0 for KML, 1 for JSON, 2 for GeoJSON.- Returns:
- A JSON string representation of the graphic.
-
RenderSymbol
public String RenderSymbol(String id, String name, String description, String symbolCode, String controlPoints, String altitudeMode, double scale, String bbox, String modifiers, int format, int symStd) Renders all multi-point symbols, creating KML that can be used to draw it on a Google map. Multipoint symbols cannot be draw the same at different scales. For instance, graphics with arrow heads will need to redraw arrowheads when you zoom in on it. Similarly, graphics like a Forward Line of Troops drawn with half circles can improve performance if clipped when the parts of the graphic that aren't on the screen. To help readjust graphics and increase performance, this function requires the scale and bounding box to help calculate the new locations.- Parameters:
id- A unique identifier used to identify the symbol by Google map. The id will be the folder name that contains the graphic.name- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.symbolCode- A 15 character symbolID corresponding to one of the graphics in the MIL-STD-2525CcontrolPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1[,z1] [xn,yn[,zn]]..."altitudeMode- Indicates whether the symbol should interpret altitudes as above sea level or above ground level. Options are "clampToGround", "relativeToGround" (from surface of earth), "absolute" (sea level), "relativeToSeaFloor" (from the bottom of major bodies of water).scale- A number corresponding to how many meters one meter of our map represents. A value "50000" would mean 1:50K which means for every meter of our map it represents 50000 meters of real world distance.bbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." Not required but can speed up rendering in some cases. example: "-50.4,23.6,-42.2,24.2"modifiers- A JSON string representing all the possible symbol modifiers represented in the MIL-STD-2525C. Format of the string will be {"modifiers": {"attributeName":"value"[,"attributeNamen":"valuen"]...}} The quotes are literal in the above notation. Example: {"modifiers": {"quantity":"4","speed":"300","azimuth":[100,200]}}format- An enumeration: 0 for KML, 1 for JSON, 2 for GeoJSON.symStd- An enumeration: 0 for 2525Bch2, 1 for 2525C.- Returns:
- A JSON string representation of the graphic.
-
RenderSymbol2D
public String RenderSymbol2D(String symbolCode, String name, String description, String controlPoints, int pixelWidth, int pixelHeight, String bbox, String modifiers) Renders all multi-point symbols, creating JSON that can be used to draw it on a 2D map. Multipoint symbols cannot be draw the same at different scales. For instance, graphics with arrow heads will need to redraw arrowheads when you zoom in on it. Similarly, graphics like a Forward Line of Troops drawn with half circles can improve performance if clipped when the parts of the graphic that aren't on the screen. To help readjust graphics and increase performance, this function requires the scale and bounding box to help calculate the new locations.- Parameters:
symbolCode- A 15 character symbolID corresponding to one of the graphics in the MIL-STD-2525Cname- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.controlPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1[,z1] [xn,yn[,zn]]..."pixelWidth-pixelHeight-bbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." example: "-50.4,23.6,-42.2,24.2"modifiers- A JSON string representing all the possible symbol modifiers represented in the MIL-STD-2525C. Format of the string will be {"modifiers": {"attributeName":"value"[,"attributeNamen":"valuen"]...}} The quotes are literal in the above notation. Example: {"modifiers": {"quantity":"4","speed":"300","azimuth":[100,200]}}- Returns:
- A JSON string representation of the graphic.
-
RenderSymbol2D
public String RenderSymbol2D(String id, String name, String description, String symbolCode, String controlPoints, int pixelWidth, int pixelHeight, String bbox, String modifiers, int format) Renders all multi-point symbols, creating KML or JSON for the user to parse and render as they like. This function requires the bounding box to help calculate the new locations.- Parameters:
id- A unique identifier used to identify the symbol by Google map. The id will be the folder name that contains the graphic.name- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.symbolCode- A 15 character symbolID corresponding to one of the graphics in the MIL-STD-2525CcontrolPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1 [xn,yn]..."pixelWidth- pixel dimensions of the viewable map areapixelHeight- pixel dimensions of the viewable map areabbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." example: "-50.4,23.6,-42.2,24.2"format- An enumeration: 0 for KML, 1 for JSON, 2 for GeoJSON.symbolModifiers- A JSON string representing all the possible symbol modifiers represented in the MIL-STD-2525C. Format of the string will be {"modifiers": {"attributeName":"value"[,"attributeNamen":"valuen"]...}} The quotes are literal in the above notation. Example: {"modifiers": {"quantity":"4","speed":"300","azimuth":[100,200]}}- Returns:
- A JSON (1) or KML (0) string representation of the graphic.
-
RenderSymbol2D
public String RenderSymbol2D(String id, String name, String description, String symbolCode, String controlPoints, int pixelWidth, int pixelHeight, String bbox, String modifiers, int format, int symStd) Renders all multi-point symbols, creating KML or JSON for the user to parse and render as they like. This function requires the bounding box to help calculate the new locations.- Parameters:
id- A unique identifier used to identify the symbol by Google map. The id will be the folder name that contains the graphic.name- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.symbolCode- A 15 character symbolID corresponding to one of the graphics in the MIL-STD-2525CcontrolPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1 [xn,yn]..."pixelWidth- pixel dimensions of the viewable map areapixelHeight- pixel dimensions of the viewable map areabbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." example: "-50.4,23.6,-42.2,24.2"format- An enumeration: 0 for KML, 1 for JSON, 2 for GeoJSON.symStd- An enumeration: 0 for 2525Bch2, 1 for 2525C.symbolModifiers- A JSON string representing all the possible symbol modifiers represented in the MIL-STD-2525C. Format of the string will be {"modifiers": {"attributeName":"value"[,"attributeNamen":"valuen"]...}} The quotes are literal in the above notation. Example: {"modifiers": {"quantity":"4","speed":"300","azimuth":[100,200]}}- Returns:
- A JSON (1) or KML (0) string representation of the graphic.
-
Render3dSymbol
public String Render3dSymbol(String name, String id, String shapeType, String description, String lineColor, String fillColor, String altitudeMode, String controlPoints, String attributes) Creates a 3D symbol to be displayed on some 3D globe surface. Generates Keyhole Markup Language (KML) to return that specifies the points and format of the rendering.
Control points should be of the format of: Attributes should be passed in as a JSON array. If more than one set of parameters are passed in as an array or more than one item, they will map to the vertex specified in the control points. The attributes are of the format:"x,y,z [x,y,z]..."{"attributes":[{"attribute1":value,...},{[optional]]}- Parameters:
name- The user displayed name for the symbol. Users will use this to identify with the symbol.id- An internally used unique id that developers can use to uniquely distinguish this symbol from others.shapeType- A 15 character ID of the type of symbol to draw.description- A brief description of what the symbol represents. Generic text that does not require any format.altitudeMode- Indicates whether the symbol should interpret altitudes as above sea level or above ground level. Options are "relativeToGround" (from surface of earth), "absolute" (sea level), "relativeToSeaFloor" (from the bottom of major bodies of water).controlPoints- The vertices of the shape. The number of required vertices varies based on the shapeType of the symbol. The simplest shape requires at least one point. Shapes that require more points than required will ignore extra points. Format for numbers is as follows:
"x,y,z [x,y,z ]..."attributes- A JSON array holding the parameters for the shape. Attributes should be of the following format:
{"attributes":[{"attribute1":value,...},{[optional]]}color- The fill color of the graphic- Returns:
- A KML string that represents a placemark for the 3D shape
-
RenderMilStd3dSymbol
public static String RenderMilStd3dSymbol(String name, String id, String symbolCode, String description, String altitudeMode, String controlPoints, String modifiers) Creates a 3D symbol from the MilStd2525B USAS or MIL-STD-2525C to be displayed on a 3D globe surface. Only certain symbols from the MIL-STD can be displayed in 3D. Most of these are graphics that fall under Fire Support. Any graphic that has an X modifier (altitude/depth) should have a 3D representation. Generates Keyhole Markup Language (KML) to return that specifies the points and format of the rendering.
Control points should be of the format of:"x,y,z [x,y,z]..."- Parameters:
name- The user displayed name for the symbol. Users will use this to identify with the symbol.id- An internally used unique id that developers can use to uniquely distinguish this symbol from others.symbolCode- A 15 character ID of the type of symbol to draw. Only symbols with an X modifier from the standard will draw.description- A brief description of what the symbol represents. Generic text that does not require any format.altitudeMode- Indicates whether the symbol should interpret altitudes as above sea level or above ground level. Options are "relativeToGround" (from surface of earth), "absolute" (sea level), "relativeToSeaFloor" (from the bottom of major bodies of water).controlPoints- The vertices of the shape. The number of required vertices varies based on the shapeType of the symbol. The simplest shape requires at least one point. Shapes that require more points than required will ignore extra points. Format for numbers is as follows:
"x,y,z [x,y,z ]..."- Returns:
- A KML string that represents a placemark for the 3D shape
-
GetPortNumber
public int GetPortNumber()gets the port number for the singlepoint server.- Returns:
- 0 if not running.
-
getSinglePointAnchor
Deprecated.Given a symbol code meant for a single point symbol, returns the anchor point at which to display that image based off the image returned from the URL of the SinglePointServer.- Parameters:
symbolID- - the 15 character symbolID of a single point MilStd2525 symbol.- Returns:
- A pixel coordinate of the format "x,y". Returns an empty string if an error occurs.
-
getSinglePointInfo
Given a symbol code meant for a single point symbol, returns the anchor point at which to display that image based off the image returned from the URL of the SinglePointServer.- Parameters:
symbolID- - the 15 character symbolID of a single point MilStd2525 symbol.- Returns:
- A pixel coordinate of the format "anchorX,anchorY,SymbolBoundsX, SymbolBoundsY,SymbolBoundsWidth,SymbolBoundsHeight,IconWidth,IconHeight". Anchor, represents the center point of the core symbol within the image. The image should be centered on this point. Symbol bounds represents the bounding rectangle of the core symbol within the image. IconWidth/Height represents the height and width of the image in its entirety. Returns an empty string if an error occurs.
-
getSinglePointInfoBatch
Given a symbol code meant for a single point symbol, returns the anchor point at which to display that image based off the image returned from the URL of the SinglePointServer.- Parameters:
batch- like {"iconURLs":["SFGP------*****?size=35invalid input: '&T'=Hello","SHGPE-----*****?size=50"]}- Returns:
- like {"singlepoints":[{"x":0,"y":0,"boundsx":0,"boundsy":0,"boundswidth":35,"boundsheight":35,"iconwidth":35,"iconwidth":35}, ... ]}
-
SymbolDimensionsToJSON
public static String SymbolDimensionsToJSON(Point2D anchor, Rectangle2D bounds, Dimension2D iconSize) -
ShouldClipMultipointSymbol
Returns true if we recommend clipping a particular symbol. Would return false for and Ambush but would return true for a Line of Contact due to the decoration on the line.- Parameters:
symbolID-- Returns:
-
GenerateSymbolAreaFillUrl
public static String GenerateSymbolAreaFillUrl(Map<String, String> modifiers, ArrayList<ArmyC2.C2SD.Utilities.ShapeInfo> clip) Deprecated.use GenerateSymbolLineFillUrlPut this here rather than in multipointhandler so that I could get the port info from the single point server.- Parameters:
modifiers-clip-- Returns:
-
GenerateSymbolLineFillUrl
public static String GenerateSymbolLineFillUrl(Map<String, String> modifiers, ArrayList<Point2D> pixels, Rectangle2D clip) Put this here rather than in multipointhandler so that I could get the port info from the single point server.- Parameters:
modifiers-clip-- Returns:
-
GenerateSymbolAreaFillUrl
public static String GenerateSymbolAreaFillUrl(String clipCoords, String SymbolIDs, int height, int width, int symbolSize) Deprecated.Only provide the end of the url like: "AREASYMBOLFILL?renderer=AreaSymbolFillRendererinvalid input: '&height'=300invalid input: '&width'=300invalid input: '&symbolIDs'=SFGP-----------,SHGP-----------" User need to provide the front: "http://127.0.0.1:6789/" -
getSinglePointByteArray
Given a symbol code meant for a single point symbol, returns the symbol as a byte array.- Parameters:
symbolID- - the 15 character symbolID of a single point MilStd2525 symbol.- Returns:
- byte array.
-
destroy
public void destroy()
-