com.supermap.mapping
Class ScreenLayer
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.mapping.ScreenLayer
-
public class ScreenLayer extends InternalHandle
The ScreenLayer class.
The screen layer is bound to the map. Every map window only has a screen layer. It can only open a map once.
The screen layer is not displayed by default, which is needed to be used in OpenGL mode. The coordinates of the objects in the screen layer are needed to set the screen coordinates.
-
-
Constructor Summary
Constructors Constructor and Description ScreenLayer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
add(Geometry geometry, java.lang.String tag)
Adds geometries to the screen layer.void
clear()
Clears all the geometric objects of the screen layer.Geometry
get(int index)
Returns the Geometry object of the screen layer with the specified index.int[]
get(java.lang.String tag)
Gets the index of the geometry with specified tag on the screen layer, which may contain more than one.int
getCount()
Gets the count of objects in the screen layer.java.lang.String
getTag(int index)
Gets the label of the feature object with the specified index number in the screen layer.boolean
isVisible()
Gets whether the screen layer is visible or not.boolean
remove(int index)
Removes the geometric object of the screen layer with the specified index.boolean
remove(java.lang.String tag)
Deletes the object of specified tag, which may contain more than one objectboolean
set(int index, Geometry geometry)
Replaces the geometric object with the specified index in the ScreenLayer object with the given geometric object.void
setVisible(boolean value)
Sets whether the screen layer is visible or not.
-
-
-
Method Detail
-
getCount
public int getCount()
Gets the count of objects in the screen layer.- Returns:
- The count of objects in the screen layer.
-
isVisible
public boolean isVisible()
Gets whether the screen layer is visible or not.- Returns:
- True or false indicating whether the screen layer is visible or not.
-
setVisible
public void setVisible(boolean value)
Sets whether the screen layer is visible or not.- Parameters:
value
- True or false indicating whether the screen layer is visible or not.
-
add
public int add(Geometry geometry, java.lang.String tag)
Adds geometries to the screen layer. The supported geometries can be set styles.- Parameters:
geometry
- The specified geometric object to be added.tag
- Specified tag of the geometry to be added. The relationship is 1:N, that is, a tag corresponds to multiple objects.- Returns:
- The index of the Geometry object which has been added to the 3D screen layer.
-
remove
public boolean remove(int index)
Removes the geometric object of the screen layer with the specified index.- Parameters:
index
- The index of the specified geometric object to be removed.- Returns:
- returns true if successful; otherwise false.
-
remove
public boolean remove(java.lang.String tag)
Deletes the object of specified tag, which may contain more than one object- Parameters:
tag
- The tag of the specified geometric object to be removed.- Returns:
- returns true if successful; otherwise false.
-
get
public Geometry get(int index)
Returns the Geometry object of the screen layer with the specified index.- Parameters:
index
- The index of the specified geometric object.- Returns:
- The geometry with specified index in the screen layer. The geometric object returned here is a copy, which does not support the connection point.
-
set
public boolean set(int index, Geometry geometry)
Replaces the geometric object with the specified index in the ScreenLayer object with the given geometric object.- Parameters:
index
- The index of the specified geometric object to be replaced.geometry
- The specified Geometry object.- Returns:
- True, if successful; Otherwise false.
-
getTag
public java.lang.String getTag(int index)
Gets the label of the feature object with the specified index number in the screen layer.- Parameters:
index
- The index of the specified geometric object.- Returns:
- The character string which is the tag of the geometric object with specified index on the screen layer.
-
clear
public void clear()
Clears all the geometric objects of the screen layer.
-
get
public int[] get(java.lang.String tag)
Gets the index of the geometry with specified tag on the screen layer, which may contain more than one.- Parameters:
tag
- The tag of the specified geometric object to be removed.- Returns:
- A integer array, which specifies the index of the object
-
-