Package com.anylogic.engine.presentation
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.presentation.Shape3D
- Methods inherited from class com.anylogic.engine.presentation.Shape
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.Locatable2D
- Field Details
- Constructor Details
- Method Details
- setWidth
- getWidth
- setHeight
- getHeight
- updateDynamicPropertiesStructural
- onClick
- contains
- getMapScale
- setMapScale
- zoomIn
- zoomOut
- pan
- getCenterLatitude
- getCenterLongitude
- setProjectionCenter
- setCenterLatitude
- setCenterLongitude
- getDistance
- getDistance
- getDistanceByRoute
- getDistanceByRoute
- getLayers
- destroy
- normalizeLatitude
- normalizeLongitude
- normalizeScale
- getPresentable
- restoreOwner
- clone
- search
- search
- searchRegion
- searchMultiRegion
- searchFirst
- searchFirstRegion
- searchFirstMultiRegion
- isLayerVisible
- setLayerVisibility
- getRouteProvider
- getRoute
- getRoute
- getRoute
- getRoute
- add
- remove
- add
- remove
- toLengthUnits
- fromLengthUnits
- setSearchBounds
- isMouseNavigationEnabled
- setMouseNavigationEnabled
- fitBounds
- getLegacyProj
- updateSVGProperties
- resetSVGState
- postSVGShapeSpecificAttributes
- changeViewPosition
- findSVGElement
- dispose
- getSVGComponent
- java.lang.Object
- com.anylogic.engine.presentation.Shape
- com.anylogic.engine.presentation.Shape3D
- com.anylogic.engine.presentation.ShapeGISMap
- All Implemented Interfaces:
AbstractShapeGISMap
,com.anylogic.engine.internal.Child
,Locatable2D
,Locatable3D
,AggregatableAnimationElement
,HasLevel
,LevelElement
,SVGElement
,UsdElement
,Serializable
,Cloneable
public class ShapeGISMap extends Shape3D implements AbstractShapeGISMap
GIS map projection manager and map renderer (persistent GIS Map shape which
displays and map projection)
GIS map is a
This class provides several projection methods
GIS map is a
Shape
and it can be placed on the model animation: it
renders the associated map projection on the screenThis class provides several projection methods
General information:
Coordinates of any point are presented as:
- the latitude of point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)
- the longitude of point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Modifier and Type | Class | Description |
---|---|---|
static class | ShapeGISMap.Layer |
Class which stores GIS map layer information
|
Modifier and Type | Field | Description |
---|---|---|
static final AbstractGISRouteProvider | STRAIGHT |
Constructor | Description |
---|---|
ShapeGISMap |
Constructs a GIS Map shape with specific attributes.
|
Modifier and Type | Method | Description |
---|---|---|
void | add |
Adds GIS markup element to drawing set of elements.
|
void | add |
Adds GIS markup element to drawing set of elements.
|
void | changeViewPosition |
Remember user changes of the map view position.
|
final ShapeGISMap | clone() |
Cloning of GIS is not supported
(Other shapes except controls and charts allow cloning) This method throws UnsupportedOperationException if called |
boolean | contains |
Test if the shape contains the point with the given coordinates
(relative to this shape's container, i.e.
|
void | destroy() |
Deprecated.
|
void | dispose() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
SVGElement | findSVGElement |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
void | fitBounds |
Make map fits specified bounds.
|
double | fromLengthUnits |
Convert value of length measured in given units to meters
|
double | getCenterLatitude() |
Deprecated.
this function is deprecated and will be removed in the next release
|
double | getCenterLongitude() |
Deprecated.
this function is deprecated and will be removed in the next release
|
double | getDistance |
Returns distance, in meters, between 2 given points
|
double | getDistance |
Returns distance, in meters, between 2 given points
|
double | getDistanceByRoute |
Calculates length of route from one point to another.
|
double | getDistanceByRoute |
Calculates length of route from one point to another.
|
double | getHeight() |
Returns the height of the shape.
|
ShapeGISMap.Layer[] | getLayers() |
Returns the array of layers used in this GIS Map
Returned array shouldn't be modified structurally: only items can be accessed for modification |
LegacyShapeGISMapProjection | getLegacyProj() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
double | getMapScale() |
Deprecated.
this function is deprecated and will be removed in the next release
|
Presentable | getPresentable() |
Returns the Presentable object (
Agent or Experiment ) where
this shape belongs to, or null. |
GISRoute | getRoute |
Creates an unidirectional route from one geographic point to another.
|
GISRoute | getRoute |
Creates route from one geographic point to another.
|
GISRoute | getRoute |
Creates an unidirectional route from one geographic point to another.
|
GISRoute | getRoute |
Creates route from one geographic point to another.
|
IGISRouteProvider | getRouteProvider() |
Retrieves default route provider for all agents in GIS space.
|
com.anylogic.engine.internal.presentation.ISVGComponent | getSVGComponent() | |
double | getWidth() |
Returns the width of the shape.
|
boolean | isLayerVisible |
Tests if a shapefile layer is visible
|
boolean | isMouseNavigationEnabled() |
Returns
true if panning and zooming with a mouse are allowed. |
static double | normalizeLatitude |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
static double | normalizeLongitude |
Returns given longitude adjusted to be in
-180...180
interval(Sometimes longitude might be specified with precision 360*n) |
static double | normalizeScale |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
boolean | onClick |
Should be overridden to define the shape reaction on mouse click.
|
void | pan |
Moves the map projection center
Parameters are amounts of delta in the resulting offset One horizontal delta is a half of longitude difference from map projection center to the west/east bound of projection One vertical delta is a half of latitude difference from map projection center to the south/north bound of projection |
void | postSVGShapeSpecificAttributes |
Posts general properties specific to a particular shape class.
|
void | remove |
Removes GIS markup element from drawing set of elements.
|
void | remove |
Removes GIS markup element from drawing set of elements.
|
void | resetSVGState |
Reset SVG state goes through the entire shape hierarchy and delete (generate "D" command) child shapes if needed
(for example we need to delete Shape3DObjects for instanced objects explicitly in case of deletion group or other hierarchy parent)
resetSVGState for children must be called before parent (to generate delete "D" command for children first)
|
void | restoreOwner |
Deprecated.
|
List<GISPoint> | search | |
List<GISNode> | search | |
GISPoint | searchFirst |
Search for a point on the Earth corresponding to the user's query.
|
GISMultiRegion | searchFirstMultiRegion | |
GISRegion | searchFirstRegion | |
List<GISMultiRegion> | searchMultiRegion | |
List<GISRegion> | searchRegion | |
void | setCenterLatitude |
Sets the latitude of the map projection center, measured in degrees (-90
...
|
void | setCenterLongitude |
Sets the longitude of the map projection center, measured in degrees
(-180 ...
|
void | setHeight |
Sets the height of the shape.
|
void | setLayerVisibility |
Shows or hides a shapefile layer.
|
void | setMapScale |
Sets the scale of map projection
|
void | setMouseNavigationEnabled |
Manage ability to pan and zoom the map with a mouse.
|
void | setProjectionCenter |
Sets the center of the map projection
|
void | setSearchBounds |
Sets bounds for search area.
|
void | setWidth |
Sets the width of the shape.
|
double | toLengthUnits |
Convert value of length measured in meters to given length units
|
boolean | updateDynamicPropertiesStructural | |
SVGElement | updateSVGProperties |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. Updates SVG properties of the element that are then sent to the rendering client. |
void | zoomIn() |
Increases scale of map projection (
x 2 ) |
void | zoomOut() |
Decreases scale of map projection (
x 1/2 ) |
canHandleClick, getDrawMode, getScaleZ, getZ, getZOffset, setDrawMode, setPos, setPos, setPos, setRotation, setScale, setScale, setScaleZ, setZ
executeUserAction, getGroup, getGroupOrOwner, getInspect, getLevel, getName, getOrGenerateUSDId, getRotation, getScaleX, getScaleY, getSVGId, getUsdVersion, getX, getY, isJava2DSwingPresentation, isOnly3D, isPublic_xjal, isSVGPresentation, isVisible, isVisibleCurrently, onAggregatorVisibilityChanged, randomPointInside, randomPointInside, removeSVGFromOwner, removeSVGImage, setChangedUsdVersion, setInspect, setLevel, setNextChangedUsdVersion, setPublic_xjal, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties
public static final AbstractGISRouteProvider STRAIGHT
public ShapeGISMap(Presentable presentable, ShapeDrawMode drawMode, boolean ispublic, double x, double y, double width, double height, String packagePrefix, ShapeGISMap.Layer[] layers, double centerLatitude, double centerLongitude, double mapScale, Color mapBorderColor, Color mapBackgroundColor, boolean showTiles, TileURLProviderType tileURLProviderType, String[] tileURLs, IGISRouteProvider routeProvider, int searchPrecisionInMeters)
Constructs a GIS Map shape with specific attributes.
- Parameters:
presentable
- the presentable object owning this shapedrawMode
- where to draw this shape: 2D, 3D or 2D+3Dispublic
- iftrue
, the shape is visible on container's presentationx
- the x coordinate of the shape upper left cornery
- the y coordinate of the shape upper left cornerwidth
- the width of the shapeheight
- the height of the shapepackagePrefix
- the package name of original agent where this image is defined, formatted using '/' characters; with '/' character at the beginning and at the endlayers
- the array ofShapeGISMap.Layer
objects to be used and drawncenterLatitude
- the latitude of the map projection center, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)centerLongitude
- the longitude of the map projection center, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)mapScale
- the scale (ratio between meters on the screen and meters on the Earth surface), e.g. 1/100000 means "1 km in 1 cm"mapBorderColor
- the color of map's boundsmapBackgroundColor
- the color of map's backgroundshowTiles
-true
draw tile layertileURLProviderType
- an element of theTileURLProviderType
enum provides URL for loading tile from servertileURLs
- (used iftileURLProviderType
is CUSTOM, otherwise ignored and may benull
) the array of urls to load tiles from a server. Must contain "[zoom]", "[x]", "[y]" to work properly. See for details.routeProvider
- the implementation of IGISRouteProvider interface provides route from one point to another and distance between two given pointssearchPrecisionInMeters
- precision measured in meters is used to simplify regions found while doing GIS search. Precision for routes should be specified insiderouteProvider
.
public void setWidth(double width)
Sets the width of the shape.
- Parameters:
width
- the width of the shape
public double getWidth()
Returns the width of the shape.
- Returns:
- the width of the shape
public void setHeight(double height)
Sets the height of the shape.
- Parameters:
height
- the height of the shape
public double getHeight()
Returns the height of the shape.
- Returns:
- the height of the shape
@AnyLogicInternalAPI public boolean updateDynamicPropertiesStructural(boolean publicOnly)
- Overrides:
updateDynamicPropertiesStructural
in classShape
- Returns:
true
if:
1. update was done (usually for visible elements, respecting public flag etc.)
AND
2. further update of structural changes is applicable
@AnyLogicInternalCodegenAPI public boolean onClick(double latitude, double longitude)
Should be overridden to define the shape reaction on mouse click. The
click coordinates are geographical coordinates, obtained via
inverse-projection of mouse click (which is definitely within the shape
bounds) if this method is called. By default, does nothing and returns
false
.- Overrides:
onClick
in classShape
- Parameters:
latitude
- the latitude of point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90), where mouse click occurredlongitude
- the longitude of point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180), where mouse click occurred- Returns:
- always return
false
here.
public boolean contains(double px, double py)
Description copied from class:
Shape
@Deprecated public double getMapScale()
Deprecated.
this function is deprecated and will be removed in the next release
public void setMapScale(double mapScale)
Sets the scale of map projection
- Specified by:
setMapScale
in interfaceAbstractShapeGISMap
- Parameters:
mapScale
- the scale (ratio between meters on the screen and meters on the Earth surface), e.g. 1/100000 means "1 km in 1 cm"
public void zoomIn()
Increases scale of map projection (
x 2
)- Specified by:
zoomIn
in interfaceAbstractShapeGISMap
public void zoomOut()
Decreases scale of map projection (
x 1/2
)- Specified by:
zoomOut
in interfaceAbstractShapeGISMap
public void pan(double toEast, double toNorth)
Moves the map projection center
Parameters are amounts of delta in the resulting offset
One horizontal delta is a half of longitude difference from map projection center to the west/east bound of projection
One vertical delta is a half of latitude difference from map projection center to the south/north bound of projection
Parameters are amounts of delta in the resulting offset
One horizontal delta is a half of longitude difference from map projection center to the west/east bound of projection
One vertical delta is a half of latitude difference from map projection center to the south/north bound of projection
- Specified by:
pan
in interfaceAbstractShapeGISMap
- Parameters:
toEast
- number of horizontal deltas to be added to the projection center, if positive, center is moved to the East, if negative - to the WesttoNorth
- number of vertical deltas to be added to the projection center, if positive, center is moved to the North, if negative - to the South
@Deprecated public double getCenterLatitude()
Deprecated.
this function is deprecated and will be removed in the next release
@Deprecated public double getCenterLongitude()
Deprecated.
this function is deprecated and will be removed in the next release
public void setProjectionCenter(double centerLatitude, double centerLongitude)
Sets the center of the map projection
- Specified by:
setProjectionCenter
in interfaceAbstractShapeGISMap
- Parameters:
centerLatitude
- new latitude of the map projection center, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)centerLongitude
- new longitude of the map projection center, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
public void setCenterLatitude(double centerLatitude)
Sets the latitude of the map projection center, measured in degrees (-90
... (South) ... 0 ... (North) ... +90)
- Specified by:
setCenterLatitude
in interfaceAbstractShapeGISMap
- Parameters:
centerLatitude
- new latitude of the map projection center, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)
public void setCenterLongitude(double centerLongitude)
Sets the longitude of the map projection center, measured in degrees
(-180 ... (West) ... 0 ... (East) ... +180)
- Specified by:
setCenterLongitude
in interfaceAbstractShapeGISMap
- Parameters:
centerLongitude
- new longitude of the map projection center, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
public double getDistance(double latFrom, double lonFrom, double latTo, double lonTo)
Returns distance, in meters, between 2 given points
- Specified by:
getDistance
in interfaceAbstractShapeGISMap
- Parameters:
latFrom
- the latitude of the 1st point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)lonFrom
- the longitude of the 1st point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)latTo
- the latitude of the 2nd point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)lonTo
- the longitude of the 2nd point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)- Returns:
- the distance, in meters, between 2 given points
public double getDistance(GISPoint fromPoint, GISPoint toPoint)
Returns distance, in meters, between 2 given points
- Specified by:
getDistance
in interfaceAbstractShapeGISMap
- Parameters:
fromPoint
- the 1st point on the Earth's surfacetoPoint
- the 2nd point on the Earth's surface- Returns:
- the distance, in meters, between 2 given points
public double getDistanceByRoute(double latFrom, double lonFrom, double latTo, double lonTo)
Calculates length of route from one point to another.
Uses route provider to create a route.
- Specified by:
getDistanceByRoute
in interfaceAbstractShapeGISMap
- Parameters:
latFrom
- latitude of the start pointlonFrom
- longitude of the start pointlatTo
- latitude of the end pointlonTo
- longitude of the end point- Returns:
- length of route in meters
public double getDistanceByRoute(GISPoint fromPoint, GISPoint toPoint)
Calculates length of route from one point to another.
Uses route provider to create a route.
- Specified by:
getDistanceByRoute
in interfaceAbstractShapeGISMap
- Parameters:
fromPoint
- the 1st point on the Earth's surfacetoPoint
- the 2nd point on the Earth's surface- Returns:
- length of route in meters
public ShapeGISMap.Layer[] getLayers()
Returns the array of layers used in this GIS Map
Returned array shouldn't be modified structurally: only items can be accessed for modification
Returned array shouldn't be modified structurally: only items can be accessed for modification
- Returns:
- the array of layers used in this GIS Map
@Deprecated public void destroy()
Deprecated.
@AnyLogicInternalAPI public static double normalizeLatitude(double degrees)
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.
@AnyLogicInternalAPI public static double normalizeLongitude(double degrees)
Returns given longitude adjusted to be in
(Sometimes longitude might be specified with precision 360*n)
-180...180
interval(Sometimes longitude might be specified with precision 360*n)
- Parameters:
degrees
- the longitude measured in degrees- Returns:
- the given longitude adjusted to be in
-180...180
interval
@AnyLogicInternalAPI public static double normalizeScale(double mapScale)
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.
public Presentable getPresentable()
Description copied from class:
Shape
Returns the Presentable object (
Agent
or Experiment
) where
this shape belongs to, or null.- Specified by:
getPresentable
in interfaceSVGElement
- Overrides:
getPresentable
in classShape
- Returns:
- the Presentable that owns this shape, or null
@AnyLogicInternalCodegenAPI @Deprecated public void restoreOwner(Object owner)
Deprecated.
Description copied from class:
Shape
This method normally should not be called by user
This method restores owner of this object
The method is used in snapshot saving/loading
This method restores owner of this object
The method is used in snapshot saving/loading
- Specified by:
restoreOwner
in interfacecom.anylogic.engine.internal.Child
- Overrides:
restoreOwner
in classShape
- Parameters:
owner
- owner of this object, usuallyAgent
,Experiment
orShapeGroup
public final ShapeGISMap clone()
Cloning of GIS is not supported
(Other shapes except controls and charts allow cloning)
This method throws
(Other shapes except controls and charts allow cloning)
This method throws
UnsupportedOperationException
if calledpublic List<GISNode> search(String query, boolean area, boolean visibleAreaOnly)
public List<GISPoint> search(String query)
public List<GISRegion> searchRegion(String query)
public List<GISMultiRegion> searchMultiRegion(String query)
public GISPoint searchFirst(String query)
Search for a point on the Earth corresponding to the user's query.
- Specified by:
searchFirst
in interfaceAbstractShapeGISMap
- Parameters:
query
- name of a geographic object or POI
public GISRegion searchFirstRegion(String query)
public GISMultiRegion searchFirstMultiRegion(String query)
public boolean isLayerVisible(String shapeFileName)
Tests if a shapefile layer is visible
- Parameters:
shapeFileName
- the name of the shapefile- Returns:
- true if the layer is visible, false if not or not found
public void setLayerVisibility(String shapeFileName, boolean visible)
Shows or hides a shapefile layer.
- Parameters:
shapeFileName
- the name of the shapefilevisible
- true to show, false to hide
public IGISRouteProvider getRouteProvider()
Retrieves default route provider for all agents in GIS space.
- Specified by:
getRouteProvider
in interfaceAbstractShapeGISMap
- Returns:
- default route provider
- See Also:
-
IGISRouteProvider
public GISRoute getRoute(GISPoint start, GISPoint end, boolean bidirectional)
Creates route from one geographic point to another.
- Parameters:
start
- point on the Earth's surfaceend
- point on the Earth's surfacebidirectional
-true
if edge of the network would be bidirectional- Returns:
- route between two points
public GISRoute getRoute(double startLatitude, double startLongitude, double endLatitude, double endLongitude, boolean bidirectional)
Creates route from one geographic point to another.
- Parameters:
startLatitude
- latitude of the start pointstartLongitude
- longitude of the start pointendLatitude
- latitude of the end pointendLongitude
- latitude of the end pointbidirectional
-true
if edge of the network would be bidirectional- Returns:
- route between two points
public GISRoute getRoute(GISPoint start, GISPoint end)
Creates an unidirectional route from one geographic point to another.
- Specified by:
getRoute
in interfaceAbstractShapeGISMap
- Parameters:
start
- point on the Earth's surfaceend
- point on the Earth's surface- Returns:
- route between two points
public GISRoute getRoute(double startLatitude, double startLongitude, double endLatitude, double endLongitude)
Creates an unidirectional route from one geographic point to another.
- Specified by:
getRoute
in interfaceAbstractShapeGISMap
- Parameters:
startLatitude
- latitude of the start pointstartLongitude
- longitude of the start pointendLatitude
- latitude of the end pointendLongitude
- latitude of the end point- Returns:
- route between two points
public void add(GISMarkupElement markupElement)
Adds GIS markup element to drawing set of elements.
public void remove(GISMarkupElement markupElement)
Removes GIS markup element from drawing set of elements.
public void add(GISMultiRegion markupElement)
Adds GIS markup element to drawing set of elements.
public void remove(GISMultiRegion markupElement)
Removes GIS markup element from drawing set of elements.
public double toLengthUnits(double length, LengthUnits units)
Convert value of length measured in meters to given length units
- Parameters:
length
- value of lengthunits
- length units- Returns:
- length measured in specified units
public double fromLengthUnits(double length, LengthUnits units)
Convert value of length measured in given units to meters
- Parameters:
length
- value of lengthunits
- length units- Returns:
- length measured in meters
public void setSearchBounds(double bottomLatitude, double leftLongitude, double topLatitude, double rigthLongitude)
Sets bounds for search area.
- Parameters:
bottomLat
- the latitude of searchable area's bottom bound, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)leftLon
- the longitude of searchable area's left bound, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)topLat
- the latitude of searchable area's top bound, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)rightLon
- the longitude of searchable area's right bound, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
public void fitBounds(double bottomLat, double leftLon, double topLat, double rightLon)
Make map fits specified bounds.
- Parameters:
bottomLat
- the latitude of visible area's bottom bound, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)leftLon
- the longitude of visible area's left bound, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)topLat
- the latitude of visible area's top bound, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)rightLon
- the longitude of visible area's right bound, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
@AnyLogicInternalAPI public LegacyShapeGISMapProjection getLegacyProj()
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.
@AnyLogicInternalAPI public SVGElement updateSVGProperties(List<SVGCommand> output, ShapeDrawMode drawMode, boolean publicOnly, SVGElement owner, SVGElement elbehind, boolean isInReplicatedShape)
Description copied from interface:
SVGElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Updates SVG properties of the element that are then sent to the rendering client. If the element is not yet in the SVG scene, generates "C" command, if it is there, but some properties are out of date, generates "U" command. If SVG drawing of this element is not needed because of public only settings, or permanently not needed, or not supported yet, returns false and does nothing.
it may be removed/renamed in future.
Updates SVG properties of the element that are then sent to the rendering client. If the element is not yet in the SVG scene, generates "C" command, if it is there, but some properties are out of date, generates "U" command. If SVG drawing of this element is not needed because of public only settings, or permanently not needed, or not supported yet, returns false and does nothing.
- Specified by:
updateSVGProperties
in interfaceSVGElement
- Overrides:
updateSVGProperties
in classShape
- Parameters:
output
- the list of commands to add todrawMode
- TODOpublicOnly
- drawing context: if true, only shapes that are marked as public only are updatedowner
- the SVG element that serves as a container for this elementelbehind
- the SVG element behind this one, or null if none or if order is irrelevant- Returns:
- the actual owner this element has been added to or
null
if element is not drawn (e.g. drawing of this element is not needed because of public only settings, permanently not needed or not supported - hence SVG id is not set). The actual owner may differ from the givenowner
when the svg element is added to a different place (e.g. GIS map).
@AnyLogicInternalAPI public void resetSVGState(SVGElement elementBeingDeleted, boolean delete, Consumer<SVGCommand> commandOutput)
Description copied from class:
Shape
Reset SVG state goes through the entire shape hierarchy and delete (generate "D" command) child shapes if needed
(for example we need to delete Shape3DObjects for instanced objects explicitly in case of deletion group or other hierarchy parent)
resetSVGState for children must be called before parent (to generate delete "D" command for children first)
- Specified by:
resetSVGState
in interfaceSVGElement
- Overrides:
resetSVGState
in classShape
- Parameters:
elementBeingDeleted
- top-level element that is being deleteddelete
- flag if method was called during shape deletion (delete "D" commands can be generated)
public void postSVGShapeSpecificAttributes(List<String> att, List<String> val, boolean publicOnly)
Description copied from class:
Shape
Posts general properties specific to a particular shape class.
Is triggered by SVG_DIRTY_SHAPE flag.
Made public for occasional posting of additional SVG properties from outside engine
(e.g. from libraries)
- Overrides:
postSVGShapeSpecificAttributes
in classShape
- Parameters:
att
- attribute namesval
- attribute valuespublicOnly
- TODO
public void changeViewPosition(double latitude, double longitude, double zoom)
Remember user changes of the map view position. These values are coming from animation.
@AnyLogicInternalAPI public SVGElement findSVGElement(long svgId)
Description copied from interface:
SVGElement
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:
findSVGElement
in interfaceSVGElement
- Overrides:
findSVGElement
in classShape
@AnyLogicInternalAPI public void dispose()
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.
@AnyLogicInternalAPI public com.anylogic.engine.internal.presentation.ISVGComponent getSVGComponent()
- Specified by:
getSVGComponent
in interfaceSVGElement