User Tools

Site Tools


thinkgeo.mapsuite.portablecore.iconvalueitem

This is an old revision of the document!


ThinkGeo.MapSuite.PortableCore.IconValueItem

<!– Class –> This class is a single item in an IconValueStyle.

Remarks

This item is used in the IconValueStyle to determine which way to draw the feature based on the FieldValue property.

How IconValueStyle works:

When you create an IconValueStyle, you need to add multiple IconValueItems to its collection. You input the column name in the IconValueStyle and it will compare the data's value to each IconValueItem's FieldValue. If they match, then it will draw the Feature using the properties of the IconValueItem. In this way, you can render different data with different icons or text.

The MinimumLength and MaximumLength properties are important because they are used to ensure that a properly sized icon is used to draw things like road signs. For example, you can set the minimum and maximum values so that the sign icon for a single-digit road number uses one icon, while a two-digit road uses another, wider sign icon in a separate IconValueItem.

Inheritance Hierarchy

Members Summary

Public Constructors

Name Parameters DeclaringType Summary
Public MethodIconValueItem This is the constructor for the class.
Public MethodIconValueItem String, String, TextStyle This is the constructor for the class.
Public MethodIconValueItem String, GeoImage, TextStyle This is the constructor for the class.

Protected Constructors

Name Parameters DeclaringType Summary

Public Methods

Name Parameters DeclaringType Summary
Public MethodEquals Object Object
Public MethodGetHashCode Object
Public MethodGetIconImage This method gets the icon we will draw as a GeoImage.
Public MethodGetType Object
Public MethodToString Object

Protected Methods

Name Parameters DeclaringType Summary
Protected MethodFinalize Object
Protected MethodMemberwiseClone Object

Public Properties

Name Return DeclaringType Summary
Public PropertyFieldValue String This property gets and sets the field value that has to match in the IconValueStyle.
Public PropertyIconFilePathName String This property gets and sets the path and filename of the icon that will be drawn.
Public PropertyTextStyle TextStyle This property gets and sets the style that will be used to draw the text in the icon.
Public PropertyTextValueLengthMax Int32 This property gets and sets the maximum string length for this item to match.
Public PropertyTextValueLengthMin Int32 This property gets and sets the minimum string length for this item to match.

Protected Properties

Name Return DeclaringType Summary

Public Events

Name Event Arguments DeclaringType Summary

Public Constructors

IconValueItem()

This is the constructor for the class.

Overloads

This is the default constructor for the class.

Remarks

If you use the constructor, then you should set all the properties manually.

Parameters

Name Type Description

Go Back

IconValueItem(String, String, TextStyle)

This is the constructor for the class.

Overloads

This constructor allows you to set the field value, the path and filename of the icon and the text style you want to use to render it.

Remarks

You would typically use this constructor if you are using an icon that's located on disk. If you need to use an image from a stream instead, there is another overload that takes a GeoImage.

Parameters

Name Type Description
fieldValue String<!– System.String –> This parameter is the value you want to match.
iconPathFilename String<!– System.String –> This parameter is the path and filename of the image you want to use.
textStyle TextStyle<!– ThinkGeo.MapSuite.PortableCore.TextStyle –> This parameter is the TextStyle of how you want the text drawn.

Go Back

IconValueItem(String, GeoImage, TextStyle)

This is the constructor for the class.

Overloads

This constructor allows you to set the field value, the GeoImage, and the text style you want to use to render it.

Remarks

You will typically use this overload if you need to use a stream for the image. If you need to use a file located on disk instead, there is another overload that takes the path and filename to an image.

Parameters

Name Type Description
fieldValue String<!– System.String –> This parameter is the value you want to match.
iconImage GeoImage<!– ThinkGeo.MapSuite.PortableCore.GeoImage –> This parameter is the GeoImage of the image you want to use.
textStyle TextStyle<!– ThinkGeo.MapSuite.PortableCore.TextStyle –> This parameter is the TextStyle of how you want the text drawn.

Go Back

Protected Constructors

Public Methods

Equals(Object)

Return Value

Return Type Description
Boolean<!– System.Boolean –>

Parameters

Name Type Description
obj Object<!– System.Object –>

<!– System.Object –> Go Back

GetHashCode()

Return Value

Return Type Description
Int32<!– System.Int32 –>

Parameters

Name Type Description

<!– System.Object –> Go Back

GetIconImage()

This method gets the icon we will draw as a GeoImage.

Remarks

This method is used when drawing to get the image as a GeoImage. We will internally either pass along the GeoImage the user set, or create a GeoImage from the IconFilePathName that was set.

Return Value

Return Type Description
GeoImage<!– ThinkGeo.MapSuite.PortableCore.GeoImage –> This method gets the icon we will draw as a GeoImage.

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.PortableCore.IconValueItem –> Go Back

GetType()

Return Value

Return Type Description
Type<!– System.Type –>

Parameters

Name Type Description

<!– System.Object –> Go Back

ToString()

Return Value

Return Type Description
String<!– System.String –>

Parameters

Name Type Description

<!– System.Object –> Go Back

Protected Methods

Finalize()

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description

<!– System.Object –> Go Back

MemberwiseClone()

Return Value

Return Type Description
Object<!– System.Object –>

Parameters

Name Type Description

<!– System.Object –> Go Back

Public Properties

FieldValue

This property gets and sets the field value that has to match in the IconValueStyle.

Remarks

For an explanation on how the IconValueStyle works, see the IconValueStyle Class remarks.

Return Value

Return Type
String<!– System.String –>

<!– ThinkGeo.MapSuite.PortableCore.IconValueItem –> Go Back

IconFilePathName

This property gets and sets the path and filename of the icon that will be drawn.

Remarks

If you need to use a GeoImage, you can set the GeoImage in the constructor or use the property.

Return Value

Return Type
String<!– System.String –>

<!– ThinkGeo.MapSuite.PortableCore.IconValueItem –> Go Back

TextStyle

This property gets and sets the style that will be used to draw the text in the icon.

Return Value

Return Type
TextStyle<!– ThinkGeo.MapSuite.PortableCore.TextStyle –>

<!– ThinkGeo.MapSuite.PortableCore.IconValueItem –> Go Back

TextValueLengthMax

This property gets and sets the maximum string length for this item to match.

Remarks

This is an important property because it is used to ensure that that a properly sized icon is used to draw things like road signs. For example, you can set the minimum and maximum values so that the sign icon for a single-digit road number uses one icon, while a two-digit road uses another, wider sign icon in a separate IconValueItem.

Return Value

Return Type
Int32<!– System.Int32 –>

<!– ThinkGeo.MapSuite.PortableCore.IconValueItem –> Go Back

TextValueLengthMin

This property gets and sets the minimum string length for this item to match.

Remarks

This is an important property because it is used to ensure that that a properly sized icon is used to draw things like road signs. For example, you can set the minimum and maximum values so that the sign icon for a single-digit road number uses one icon, while a two-digit road uses another, wider sign icon in a separate IconValueItem.

Return Value

Return Type
Int32<!– System.Int32 –>

<!– ThinkGeo.MapSuite.PortableCore.IconValueItem –> Go Back

Protected Properties

Public Events

thinkgeo.mapsuite.portablecore.iconvalueitem.1440040132.txt.gz · Last modified: 2015/09/21 08:10 (external edit)