Package com.anylogic.engine.presentation
- java.lang.Object
- com.anylogic.engine.presentation.ShapeGISMap.Layer
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ShapeGISMap
public static class ShapeGISMap.Layer extends Object implements Serializable
Class which stores GIS map layer information
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Constructor | Description |
---|---|
Layer |
Creates new Layer descriptor
|
Modifier and Type | Method | Description |
---|---|---|
com.bbn.openmap.layer.shape.areas.PoliticalArea | findPoliticalArea |
Deprecated.
will be removed in the next release
|
com.bbn.openmap.layer.shape.areas.PoliticalArea | findPoliticalArea |
Deprecated.
will be removed in the next release
|
com.bbn.openmap.layer.shape.areas.PoliticalArea[] | findPoliticalAreas |
Deprecated.
will be removed in the next release
|
com.bbn.openmap.layer.shape.areas.AreaShapeLayer | getLayerObject() |
Deprecated.
will be removed in the next release
|
com.bbn.openmap.omGraphics.OMGraphicList | getObjects |
Deprecated.
will be removed in the next release
|
com.bbn.openmap.omGraphics.OMGraphicList | getObjects |
Deprecated.
will be removed in the next release
|
Collection<com.bbn.openmap.layer.shape.areas.PoliticalArea> | getPoliticalAreas() |
Deprecated.
will be removed in the next release
|
boolean | isVisible() | |
void | setFillColor |
Sets the new fill color for the given shapes in the shape file.
|
void | setLineColor |
Sets the new line color for the given shapes in the shape file.
|
void | setVisible |
public Layer(String shapeFileName, String dbfFileName, Color lineColor, Color fillColor, int objectNameColumnIndex, boolean visible)
Creates new Layer descriptor
- Parameters:
shapeFileName
- GIS Map Shape file name (.shp) with shapes of the layerdbfFileName
- DBF file name with descriptions of GIS Map Shape file objectslineColor
- default line color for objects in this layerfillColor
- default fill color for objects in this layerobjectNameColumnIndex
- the index of the object-name column in .dbf file
@Deprecated public Collection<com.bbn.openmap.layer.shape.areas.PoliticalArea> getPoliticalAreas()
Deprecated.
will be removed in the next release
Returns the collection of all political areas located in this layer
Political areas are usually defined in DBF file
Each
Political areas are usually defined in DBF file
Each
PoliticalArea
has its identifier and human-readable name
and may contain several shapes on the map (e.g. islands)PoliticalArea
has methods for tuning its presentation on the
map, e.g. changing fill color.- Returns:
- the collection of all political areas located in this layer
@Deprecated public com.bbn.openmap.layer.shape.areas.PoliticalArea findPoliticalArea(String identifier)
Deprecated.
will be removed in the next release
Finds political area by its string identifier
- Parameters:
identifier
- the identifier of political area- Returns:
- the political area with given identifier or
null
@Deprecated public com.bbn.openmap.layer.shape.areas.PoliticalArea[] findPoliticalAreas(double latitude, double longitude)
Deprecated.
will be removed in the next release
Returns
PoliticalArea
objects of this layer located at the
given coordinates- Parameters:
latitude
- the latitude of point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)longitude
- the longitude of point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)- Returns:
- the array with
PoliticalArea
objects of this layer located at the given coordinates (empty array if no political areas were found)
@Deprecated public com.bbn.openmap.layer.shape.areas.PoliticalArea findPoliticalArea(double latitude, double longitude)
Deprecated.
will be removed in the next release
Returns (if there are several objects at the same point, returns one
of them)
- Parameters:
latitude
- the latitude of point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)longitude
- the longitude of point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)- Returns:
- the
PoliticalArea
object of this layer located at the given coordinates (null
if no political areas were found)
@Deprecated public com.bbn.openmap.omGraphics.OMGraphicList getObjects(double latitude, double longitude)
Deprecated.
will be removed in the next release
Returns new OMGraphicsList with objects of this layer located at the
given coordinates
- Parameters:
latitude
- the latitude of point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)longitude
- the longitude of point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)- Returns:
- new OMGraphicsList with objects of this layer located at the given coordinates
@Deprecated public com.bbn.openmap.omGraphics.OMGraphicList getObjects(String objectName)
Deprecated.
will be removed in the next release
Returns new OMGraphicsList with objects of this layer having name
objectName
- Parameters:
objectName
- the name of objects to be returned- Returns:
- new OMGraphicsList with objects of this layer having name
objectName
@Deprecated public com.bbn.openmap.layer.shape.areas.AreaShapeLayer getLayerObject()
Deprecated.
will be removed in the next release
Returns OpenMap layer object associated with this Layer
- Returns:
- the OpenMap layer object associated with this Layer
public boolean isVisible()
public void setVisible(boolean visible)
public void setLineColor(List<Integer> shapes, Color color)
Sets the new line color for the given shapes in the shape file.
WARNING: This is a temporary API, it may be replaced in the future versions.
- Parameters:
shapes
- the list of shape indices, 0-basedcolor
- the new line color
public void setFillColor(List<Integer> shapes, Color color)
Sets the new fill color for the given shapes in the shape file.
WARNING: This is a temporary API, it may be replaced in the future versions.
- Parameters:
shapes
- the list of shape indices, 0-basedcolor
- the new fill color