- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkup
- com.anylogic.engine.markup.GISMarkupElement
- All Implemented Interfaces:
AggregatableAnimationElement
,INetworkMarkupElement
,SVGElement
,Serializable
public abstract class GISMarkupElement extends AbstractMarkup implements INetworkMarkupElement, Serializable
Basic GIS markup element could be a part of
GISNetwork
.
GIS map is able to draw GIS markup element in geographic coordinate system (latitude, longitude).- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Modifier and Type | Method | Description |
---|---|---|
abstract com.bbn.openmap.omGraphics.OMGraphic | createOMGraphicObject() | |
void | discardOwner() | |
RuntimeException | error | |
static GISMarkupElement | getFromOMGraphic | |
Color | getLineColor() |
Returns the line color of the markup element, or
null if markup element has no line color or
has textured line (in this case getLineTexture() should be used instead) |
LineStyle | getLineStyle() |
Returns the line style of the markup element:
{LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED} |
Texture | getLineTexture() |
Returns the line texture of the markup element, if the markup element has line texture
|
double | getLineWidth() |
Returns the line width of the markup element.
|
INetwork<GISNode, | getNetwork() | |
com.bbn.openmap.omGraphics.OMGraphic | getOmGraphic |
Deprecated.
|
Agent | getSpace() |
Returns the agent where the markup element is defined
|
void | initialize() |
Prepares the object after setting parameters/adding segments.
This function should be called after setup of markup element initially created using constructor without arguments. |
void | onAggregatorVisibilityChanged() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
void | remove() |
Removes the markup element from the presentation, if it is not a part of the
presentation, does nothing.
|
void | setLineColor |
Sets the line color (or
Texture ) of the markup element. |
void | setLineStyle |
Sets the line style of the markup element:
{LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED} |
void | setLineWidth |
Sets the line width of the markup element, 0 means thinnest possible
|
void | setOwner |
Sets GIS map this element belongs to.
|
void | setVisible |
Sets the visibility of the markup element.
|
executeUserAction, findSVGElement, getDrawMode, getName, getSVGId, initializeInternal, isPublic, isVisible, onAggregatorInitialized, removeSVGFromOwner, resetSVGState, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
public INetwork<GISNode,GISRoute> getNetwork()
- Specified by:
getNetwork
in interfaceINetworkMarkupElement
- Returns:
- network this markup element belongs to
or
null
if this element isn't a part of a network
public RuntimeException error(String errorText)
- Specified by:
error
in classAbstractMarkup
@AnyLogicInternalAPI public void discardOwner()
- Overrides:
discardOwner
in classAbstractMarkup
public void setOwner(ShapeGISMap map)
Sets GIS map this element belongs to.
- Parameters:
map
- the GIS map object
public void initialize()
Prepares the object after setting parameters/adding segments.
This function should be called after setup of markup element initially created using constructor without arguments.
This function should be called after setup of markup element initially created using constructor without arguments.
public void setVisible(boolean v)
Description copied from class:
AbstractMarkup
Sets the visibility of the markup element.
- Overrides:
setVisible
in classAbstractMarkup
- Parameters:
v
- visibility:true
- visible,false
- not
@AnyLogicInternalAPI public void onAggregatorVisibilityChanged()
Description copied from interface:
AggregatableAnimationElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Specified by:
onAggregatorVisibilityChanged
in interfaceAggregatableAnimationElement
- Overrides:
onAggregatorVisibilityChanged
in classAbstractMarkup
public Agent getSpace()
Description copied from class:
AbstractMarkup
Returns the agent where the markup element is defined
- Specified by:
getSpace
in interfaceINetworkMarkupElement
- Specified by:
getSpace
in classAbstractMarkup
- Returns:
- the agent associated with this element
public void remove()
Description copied from class:
AbstractMarkup
Removes the markup element from the presentation, if it is not a part of the
presentation, does nothing. Please note that removal from presentation does
not necessarily mean removing from the model logic as logical networks and
routes may have been created before the removal and survive it.
- Specified by:
remove
in classAbstractMarkup
public void setLineColor(Paint lineColor)
Sets the line color (or
Texture
) of the markup element.- Parameters:
lineColor
- the new line color, null = do not draw the markup element line
public Color getLineColor()
Returns the line color of the markup element, or
null
if markup element has no line color or
has textured line (in this case getLineTexture()
should be used instead)- Returns:
- the line color of the markup element
public Texture getLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
- Returns:
- the line texture of the markup element
public double getLineWidth()
Returns the line width of the markup element.
- Returns:
- the line width of the markup element
public void setLineWidth(double width)
Sets the line width of the markup element, 0 means thinnest possible
- Parameters:
width
- the new line width of the markup element
public void setLineStyle(LineStyle lineStyle)
Sets the line style of the markup element:
{LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
- Parameters:
lineStyle
- the new style of the markup element
public LineStyle getLineStyle()
Returns the line style of the markup element:
{LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
- Returns:
- the line style of the markup element
@Deprecated @AnyLogicInternalAPI public com.bbn.openmap.omGraphics.OMGraphic getOmGraphic(boolean createIfNull)
Deprecated.
@AnyLogicInternalAPI public abstract com.bbn.openmap.omGraphics.OMGraphic createOMGraphicObject()
@AnyLogicInternalAPI public static GISMarkupElement getFromOMGraphic(com.bbn.openmap.omGraphics.OMGraphic omGraphic)