com.supermap.mapping
Class Legend
- java.lang.Object
-
- com.supermap.mapping.Legend
-
public class Legend extends java.lang.ObjectThe legend control class, which is used to represent display symbols of all spatial objects in the current bounds.
Support for setting legend control properties: line height, text size, text color 3 attributes.
Note: The legend item returns a maximum of 100; a solid-filled legend requires the user to specify a string of solid colors, which is not displayed in the control if it is not specified.
-
-
Constructor Summary
Constructors Constructor and Description Legend(Map map)The default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddColorLegendItem(int type, ColorLegendItem item)Add a color value for the specified type.voidaddUserDefinedLegendItem(LegendItem item)Add a user-defined legend subkey.voidconnectLegendView(LegendView view)Associate legend with legend control.voiddispose()Disposes the resources occupied by the object.voidremoveColorLegendItem(int type, ColorLegendItem item)Delete the color values of the specified type.voidremoveUserDefinedLegendItem(LegendItem item)Delete the user-defined legend subkey.
-
-
-
Constructor Detail
-
Legend
public Legend(Map map)
The default constructor- Parameters:
map- The current map.
-
-
Method Detail
-
connectLegendView
public void connectLegendView(LegendView view)
Associate legend with legend control.- Parameters:
view- current map.
-
addColorLegendItem
public void addColorLegendItem(int type, ColorLegendItem item)Add a color value for the specified type.- Parameters:
type- color value legend type (0: point, 1: line, 2: face).item- color value legend subkey.
-
removeColorLegendItem
public void removeColorLegendItem(int type, ColorLegendItem item)Delete the color values of the specified type.- Parameters:
type- color value legend type (0: point, 1: line, 2: face).item- color value legend subkey.
-
addUserDefinedLegendItem
public void addUserDefinedLegendItem(LegendItem item)
Add a user-defined legend subkey.The user needs to customize the caption and bitmap for the legend subkey.
- Parameters:
item- User-defined legend subkey.
-
removeUserDefinedLegendItem
public void removeUserDefinedLegendItem(LegendItem item)
Delete the user-defined legend subkey.- Parameters:
item- User-defined legend subkey.
-
dispose
public void dispose()
Disposes the resources occupied by the object. After calling this method, this object will not be usable.
-
-