User Tools

Site Tools


thinkgeo.mapsuite.core.icontextstyle

Table of Contents

ThinkGeo.MapSuite.Core.IconTextStyle

Note: The page was created before Map Suite 10. Map Suite 10.0 organized many classes into new namespaces and assemblies as well as had a few minor breaks in compatibility. The majority of previously built code should work without modification assuming the new namespaces are added. For guidance on upgrading your existing code, please check out MapSuite 10 Upgrade Guide.

<!– Class –>

Inheritance Hierarchy

Members Summary

Public Constructors

Name Parameters DeclaringType Summary
Public MethodIconTextStyle
Public MethodIconTextStyle GeoImage, String, GeoFont, GeoSolidBrush
Public MethodIconTextStyle String, String, GeoFont, GeoSolidBrush

Protected Constructors

Name Parameters DeclaringType Summary

Public Methods

Name Parameters DeclaringType Summary
Public MethodCloneDeep Style Create a copy of style using the deep clone process.
Public MethodDraw IEnumerable<Feature>, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate> Style This method draws the features on the canvas you provided.
Public MethodDraw IEnumerable<BaseShape>, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate> Style This method draws the shapes on the canvas you provided.
Public MethodDrawSample GeoCanvas Style
Public MethodDrawSample GeoCanvas, DrawingRectangleF Style This method draws a sample feature on the canvas you provided.
Public MethodEquals Object Object
Public MethodGetHashCode Object
Public MethodGetRequiredColumnNames Style This method returns the column data for each feature that is required for the style to properly draw.
Public MethodGetType Object
Public MethodStatic MemberLoadStyle Uri Style
Public MethodStatic MemberLoadStyle Stream Style
Public MethodToString Object

Protected Methods

Name Parameters DeclaringType Summary
Protected MethodCheckDuplicate LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate> PositionStyle This method will determine whether the label will be suppressed because it is a duplicate.
Protected MethodCheckDuplicateCore LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate> PositionStyle This method will determine if the label will be suppressed because it is a duplicate.
Protected MethodCheckOverlapping LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate> PositionStyle This method will determine if the label will be suppressed because of overlapping.
Protected MethodCheckOverlappingCore LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate> PositionStyle This method will determine whether the label will be suppressed because of overlapping.
Protected MethodCloneDeepCore Style Create a copy of style using the deep clone process. The default implementation method uses serialization.
Protected MethodDrawCore IEnumerable<Feature>, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate> Style(overriden)
Protected MethodDrawSampleCore GeoCanvas, DrawingRectangleF Style(overriden)
Protected MethodFilterFeaturesCore IEnumerable<Feature>, GeoCanvas PositionStyle This method filters the features based on the grid size to facilitate deterministic labeling.
Protected MethodFinalize Object
Protected MethodFormat String, BaseShape PositionStyle
Protected MethodFormatCore String, BaseShape PositionStyle(overriden)
Protected MethodGetLabelingCandidateCore Feature, GeoCanvas PositionStyle(overriden)
Protected MethodGetLabelingCandidates Feature, GeoCanvas PositionStyle This method determines whether the specified feature is a good candidate to be labeled, based on the labeling properties set.
Protected MethodGetRequiredColumnNamesCore Style(overriden)
Protected MethodMemberwiseClone Object
Protected MethodOnFormatted FormattedPositionStyleEventArgs PositionStyle
Protected MethodOnFormatting FormattingPositionStyleEventArgs PositionStyle

Public Properties

Name Return DeclaringType Summary
Public PropertyAdvanced TextStyleAdvanced TextStyle This property gets the advanced properties of the class.
Public PropertyAllowLineCarriage Boolean PositionStyle This property gets and sets whether the labeler will allow carriage returns to be inserted.
Public PropertyBestPlacement Boolean PositionStyle This property gets and sets whether the labeler will attempt to change the label position to avoid overlapping for point-based features.
Public PropertyCustomTextStyles Collection<TextStyle> TextStyle This property returns a collection of area styles allowing you to stack multiple area styles on top of each other.
Public PropertyDateFormat String TextStyle This property gets and sets the format that will be applied to the text which can be parsed to DateTime type.
Public PropertyDrawingLevel DrawingLevel TextStyle Gets or sets the DrawingLavel for this style.
Public PropertyDuplicateRule LabelDuplicateRule PositionStyle This property gets and sets the rule that determines how duplicate labels are handled.
Public PropertyFilters Collection<String> Style
Public PropertyFittingLineInScreen Boolean TextStyle This property gets and sets whether the labeler will try to fit the label as best as it can on the visible part of a line on the screen.
Public PropertyFittingPolygon Boolean PositionStyle This property gets and sets whether the labeler will try to fit the label as best as it can within the boundary of a polygon.
Public PropertyFittingPolygonFactor Double PositionStyle This property gets and sets the factor to which it will keep the label inside of the polygon.
Public PropertyFittingPolygonInScreen Boolean TextStyle This property gets and sets whether the labeler will try to fit the label as best as it can on the visible part of a polygon on the screen.
Public PropertyFont GeoFont TextStyle This property gets and sets the font that will be used to draw the text.
Public PropertyForceHorizontalLabelForLine Boolean TextStyle This property gets and sets whether we should force horizontal labeling for lines.
Public PropertyForceLineCarriage Boolean PositionStyle This property gets and sets whether the labeler will force carriage returns to be inserted.
Public PropertyGridSize Int32 PositionStyle This property gets and sets the grid size used for deterministic labeling.
Public PropertyHaloPen GeoPen TextStyle This property gets and sets the halo pen you may use to draw a halo around the text.
Public PropertyIconFilePathName String IconStyle This property gets and sets the filename and path for the image you want to use in the style.
Public PropertyIconImage GeoImage IconStyle This property gets and sets the GeoImage you want to use for the image.
Public PropertyIconImageScale Double IconStyle This property gets and sets the scale of the image you want to draw.
Public PropertyIsActive Boolean Style This property gets and sets the active status of the style.
Public PropertyIsHaloEnable Boolean
Public PropertyIsMaskEnable Boolean
Public PropertyLabelAllLineParts Boolean PositionStyle This property gets and sets whether the labeler will label every part of a multi-part line.
Public PropertyLabelAllPolygonParts Boolean PositionStyle This property gets and sets whether the labeler will label every part of a multi-part polygon.
Public PropertyLabelPositions Dictionary<String,WorldLabelingCandidate> TextStyle Gets a value represents a keyValuepair which is a feature id and label position of the feature
Public PropertyMask AreaStyle TextStyle This property gets and sets the AreaStyle used to draw a mask behind the text.
Public PropertyMaskMargin Int32 TextStyle This property gets and sets the margin around the text that will be used for the mask.
Public PropertyName String Style This property gets and set the name of the style.
Public PropertyNumericFormat String TextStyle This property gets and sets the format that will be applied to the text which can be parsed to double type.
Public PropertyOverlappingRule LabelOverlappingRule PositionStyle This property gets and sets the rule that determines how overlapping labels are handled.
Public PropertyPointPlacement PointPlacement PositionStyle This property gets and sets the location of the label for point features relative to the point.
Public PropertyPolygonLabelingLocationMode PolygonLabelingLocationMode PositionStyle This property gets and sets the mode that determines how to locate polygon's labeling
Public PropertyRequiredColumnNames Collection<String> Style This property gets the collection of fields that are required for the style.
Public PropertyRotationAngle Double TextStyle This property gets and sets the rotation angle of the item being positioned.
Public PropertySplineType SplineType TextStyle Gets or sets the SplineType for labeling.
Public PropertySuppressPartialLabels Boolean IconStyle This property gets and sets whether a partial label in the current extent will be drawn or not.
Public PropertyTextColumnName String TextStyle This property gets and sets the column name in the data that you want to get the text from.
Public PropertyTextFormat String TextStyle This property gets and sets the format that will be applied to the text.
Public PropertyTextLineSegmentRatio Double PositionStyle This property gets and sets the ratio required for the label length to match the line length.
Public PropertyTextSolidBrush GeoSolidBrush TextStyle This property gets and sets the SolidBrush that will be used to draw the text.
Public PropertyXOffsetInPixel Single TextStyle This property gets and sets the X pixel offset for drawing each feature.
Public PropertyYOffsetInPixel Single TextStyle This property gets and sets the Y pixel offset for drawing each feature.

Protected Properties

Name Return DeclaringType Summary
Protected PropertyAllowSpline Boolean PositionStyle This property gets and sets whether line labels are allowed to spline around curved lines.
Protected PropertyFiltersCore Collection<String> Style

Public Events

Public Constructors

IconTextStyle()

Parameters

Name Type Description

Go Back

IconTextStyle(GeoImage, String, GeoFont, GeoSolidBrush)

Parameters

Name Type Description
iconImage GeoImage<!– ThinkGeo.MapSuite.Core.GeoImage –>
textColumnName String<!– System.String –>
textFont GeoFont<!– ThinkGeo.MapSuite.Core.GeoFont –>
textSolidBrush GeoSolidBrush<!– ThinkGeo.MapSuite.Core.GeoSolidBrush –>

Go Back

IconTextStyle(String, String, GeoFont, GeoSolidBrush)

Parameters

Name Type Description
iconPathFilename String<!– System.String –>
textColumnName String<!– System.String –>
textFont GeoFont<!– ThinkGeo.MapSuite.Core.GeoFont –>
textSolidBrush GeoSolidBrush<!– ThinkGeo.MapSuite.Core.GeoSolidBrush –>

Go Back

Protected Constructors

Public Methods

CloneDeep()

Create a copy of style using the deep clone process.

Remarks

The difference between deep clone and shallow clone is as follows: In shallow cloning, only the object is copied; the objects within it are not. By contrast, deep cloning copies the cloned object as well as all the objects within.

Return Value

Return Type Description
Style<!– ThinkGeo.MapSuite.Core.Style –> A cloned style.

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

Draw(IEnumerable<Feature>, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

This method draws the features on the canvas you provided.

Remarks

This method is the concrete wrapper for the abstract method DrawCore. In this method, we take the features you passed in and draw them on the canvas you provided. Each style (based on its properties) may draw each feature differently.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Return Value

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

Parameters

Name Type Description
features IEnumerable<Feature><!– System.Collections.Generic.IEnumerable{ThinkGeo.MapSuite.Core.Feature} –> This parameter represents the features you want to draw on the canvas.
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –> This parameter represents the canvas you want to draw the features on.
labelsInThisLayer Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in the current layer only.
labelsInAllLayers Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in all layers.

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

Draw(IEnumerable<BaseShape>, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

This method draws the shapes on the canvas you provided.

Remarks

This method is the concrete wrapper for the abstract method DrawCore. In this method, we take the shapes you passed in and draw them on the canvas you provided. Each style (based on its properties) may draw each shape differently.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Return Value

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

Parameters

Name Type Description
shapes IEnumerable<BaseShape><!– System.Collections.Generic.IEnumerable{ThinkGeo.MapSuite.Core.BaseShape} –> This parameter represents the shapes you want to draw on the canvas.
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –> This parameter represents the canvas you want to draw the shapes on.
labelsInThisLayer Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in the current layer only.
labelsInAllLayers Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in all layers.

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

DrawSample(GeoCanvas)

Return Value

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

Parameters

Name Type Description
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –>

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

DrawSample(GeoCanvas, DrawingRectangleF)

This method draws a sample feature on the canvas you provided.

Remarks

This method is the concrete wrapper for the abstract method DrawSampleCore. In this method we draw a sample style on the canvas you provided. This is typically used to display a legend or other sample area.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Return Value

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

Parameters

Name Type Description
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –> This parameter represents the canvas you want to draw the features on.
drawingExtent DrawingRectangleF<!– ThinkGeo.MapSuite.Core.DrawingRectangleF –>

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

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

GetRequiredColumnNames()

This method returns the column data for each feature that is required for the style to properly draw.

Remarks

This method is the concrete wrapper for the abstract method GetRequiredColumnNamesCore. In this method, we return the column names that are required for the style to draw the feature properly. For example, if you have a style that colors areas blue when a certain column value is over 100, then you need to be sure you include that column name. This will ensure that the column data is returned to you in the feature when it is ready to draw.

In many of the styles, we add properties to allow the user to specify which field they need; then, in the GetRequiredColumnNamesCore we read that property and add it to the collection.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Return Value

Return Type Description
Collection<String><!– System.Collections.ObjectModel.Collection{System.String} –> This method returns a collection of column names that the style needs.

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

GetType()

Return Value

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

Parameters

Name Type Description

<!– System.Object –> Go Back

LoadStyle(Uri)

<!– static –>

Return Value

Return Type Description
Style<!– ThinkGeo.MapSuite.Core.Style –>

Parameters

Name Type Description
styleUri Uri<!– System.Uri –>

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

LoadStyle(Stream)

<!– static –>

Return Value

Return Type Description
Style<!– ThinkGeo.MapSuite.Core.Style –>

Parameters

Name Type Description
styleStream Stream<!– System.IO.Stream –>

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

ToString()

Return Value

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

Parameters

Name Type Description

<!– System.Object –> Go Back

Protected Methods

CheckDuplicate(LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

This method will determine whether the label will be suppressed because it is a duplicate.

Remarks

This method is the concrete wrapper for the abstract method CheckDuplicateCore. This method will determine if the label will be suppressed because it is a duplicate. It also takes into consideration the duplicate rules for the class. So, for example, if we set to allow duplicates, then the method will always return false. If the class is set to not allow duplicates and this label is a duplicate, then it will return true and be suppressed.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Return Value

Return Type Description
Boolean<!– System.Boolean –> This method returns whether the label will be suppressed as a duplicate.

Parameters

Name Type Description
labelingCandidate LabelingCandidate<!– ThinkGeo.MapSuite.Core.LabelingCandidate –> This parameter is the labeling candidate that will be checked to determine if it is a duplicate.
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –> This parameter is the canvas used for calculations.
labelsInThisLayer Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in the current layer only.
labelsInAllLayers Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in all layers.

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

CheckDuplicateCore(LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

This method will determine if the label will be suppressed because it is a duplicate.

Remarks

This overridden method is called from the concrete public method CheckDuplicate. This method will determine if the label will be suppressed because it is a duplicate. It also takes into consideration the duplicate rules for the class. So, for example, if we set to allow duplicates, then the method will always return false. If the class is set to not allow duplicates and this label is a duplicate, then it will return true and be suppressed.

Return Value

Return Type Description
Boolean<!– System.Boolean –> This method returns whether the label will be suppressed as a duplicate.

Parameters

Name Type Description
labelingCandidate LabelingCandidate<!– ThinkGeo.MapSuite.Core.LabelingCandidate –> This parameter is the labeling candidate that will be checked to determine if it is a duplicate.
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –> This parameter is the canvas that will be used for calculations.
labelsInThisLayer Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in the current layer only.
labelsInAllLayers Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in all layers.

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

CheckOverlapping(LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

This method will determine if the label will be suppressed because of overlapping.

Remarks

This method is the concrete wrapper for the abstract method CheckOverlappingCore. This method will determine if the label will be suppressed because it is overlapping another label. It also takes into consideration the overlapping rules for the class. So, for example, if we set to allow overlap, then the method will always return false. If the class is set to not allow overlap and this label is overlapping, then it will return true and be suppressed.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Return Value

Return Type Description
Boolean<!– System.Boolean –> This method returns whether the label will be suppressed because of overlapping.

Parameters

Name Type Description
labelingCandidate LabelingCandidate<!– ThinkGeo.MapSuite.Core.LabelingCandidate –> This parameter is the labeling candidate that will be checked to determine if it is overlapping.
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –> This parameter is the canvas that will be used for calculations.
labelsInThisLayer Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in the current layer only.
labelsInAllLayers Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in all layers.

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

CheckOverlappingCore(LabelingCandidate, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

This method will determine whether the label will be suppressed because of overlapping.

Remarks

This overridden method is called from the concrete public method CheckOverlapping. This method will determine if the label will be suppressed because it is overlapping another label. It also takes into consideration the overlapping rules for the class. So, for example, if we set to allow overlap, then the method will always return false. If the class is set to not allow overlap and this label is overlapping, then it will return true and be suppressed.

Return Value

Return Type Description
Boolean<!– System.Boolean –> This method returns whether the label will be suppressed because of overlapping.

Parameters

Name Type Description
labelingCandidate LabelingCandidate<!– ThinkGeo.MapSuite.Core.LabelingCandidate –> This parameter is the labeling candidate that will be checked to determine if it is overlapping.
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –> This parameter is the canvas that will be used for calculations.
labelsInThisLayer Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in the current layer only.
labelsInAllLayers Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –> The labels will be drawn in all layers.

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

CloneDeepCore()

Create a copy of style using the deep clone process. The default implementation method uses serialization.

Remarks

The difference between deep clone and shallow clone is as follows: In shallow cloning, only the object is copied; the objects within it are not. By contrast, deep cloning copies the cloned object as well as all the objects within.

Return Value

Return Type Description
Style<!– ThinkGeo.MapSuite.Core.Style –> A cloned style.

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

DrawCore(IEnumerable<Feature>, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)

Return Value

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

Parameters

Name Type Description
features IEnumerable<Feature><!– System.Collections.Generic.IEnumerable{ThinkGeo.MapSuite.Core.Feature} –>
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –>
labelsInThisLayer Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –>
labelsInAllLayers Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.SimpleCandidate} –>

<!– ThinkGeo.MapSuite.Core.Style(overriden) –> Go Back

DrawSampleCore(GeoCanvas, DrawingRectangleF)

Return Value

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

Parameters

Name Type Description
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –>
drawingRectangleF DrawingRectangleF<!– ThinkGeo.MapSuite.Core.DrawingRectangleF –>

<!– ThinkGeo.MapSuite.Core.Style(overriden) –> Go Back

FilterFeaturesCore(IEnumerable<Feature>, GeoCanvas)

This method filters the features based on the grid size to facilitate deterministic labeling.

Remarks

This overridden method is called from the concrete public method FilterFeatures. In this method, we filter the features based on the grid size to facilitate deterministic labeling.

Return Value

Return Type Description
Collection<Feature><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.Feature} –> This method returns the features that will be considered for labeling.

Parameters

Name Type Description
features IEnumerable<Feature><!– System.Collections.Generic.IEnumerable{ThinkGeo.MapSuite.Core.Feature} –> This parameter represents the features that will be filtered.
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –> This parameter is the canvas that will be used for calculating font sizes.

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

Finalize()

Return Value

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

Parameters

Name Type Description

<!– System.Object –> Go Back

Format(String, BaseShape)

Return Value

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

Parameters

Name Type Description
text String<!– System.String –>
labeledShape BaseShape<!– ThinkGeo.MapSuite.Core.BaseShape –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

FormatCore(String, BaseShape)

Return Value

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

Parameters

Name Type Description
text String<!– System.String –>
labeledShape BaseShape<!– ThinkGeo.MapSuite.Core.BaseShape –>

<!– ThinkGeo.MapSuite.Core.PositionStyle(overriden) –> Go Back

GetLabelingCandidateCore(Feature, GeoCanvas)

Return Value

Return Type Description
Collection<LabelingCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.LabelingCandidate} –>

Parameters

Name Type Description
feature Feature<!– ThinkGeo.MapSuite.Core.Feature –>
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –>

<!– ThinkGeo.MapSuite.Core.PositionStyle(overriden) –> Go Back

GetLabelingCandidates(Feature, GeoCanvas)

This method determines whether the specified feature is a good candidate to be labeled, based on the labeling properties set.

Remarks

This method is the concrete wrapper for the abstract method GetLabelingCanidatesCore. This method determines if the feature passed in is a good candidate to be labeled based on the labeling properties set.

As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.

Return Value

Return Type Description
Collection<LabelingCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.LabelingCandidate} –> A collection of labeling candidates.

Parameters

Name Type Description
feature Feature<!– ThinkGeo.MapSuite.Core.Feature –> This parameter is the feature that will be considered as a labeling candidate.
canvas GeoCanvas<!– ThinkGeo.MapSuite.Core.GeoCanvas –> This parameter is the canvas that will be used to draw the feature. This method will not draw on this canvas, but rather will use it to determine font size, etc.

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

GetRequiredColumnNamesCore()

Return Value

Return Type Description
Collection<String><!– System.Collections.ObjectModel.Collection{System.String} –>

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.Core.Style(overriden) –> Go Back

MemberwiseClone()

Return Value

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

Parameters

Name Type Description

<!– System.Object –> Go Back

OnFormatted(FormattedPositionStyleEventArgs)

Return Value

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

Parameters

Name Type Description
e FormattedPositionStyleEventArgs<!– ThinkGeo.MapSuite.Core.FormattedPositionStyleEventArgs –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

OnFormatting(FormattingPositionStyleEventArgs)

Return Value

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

Parameters

Name Type Description
e FormattingPositionStyleEventArgs<!– ThinkGeo.MapSuite.Core.FormattingPositionStyleEventArgs –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

Public Properties

Advanced

This property gets the advanced properties of the class.

Remarks

The advanced properties have been consolidated in the Advanced property. This way, the standard options are more easily visible and the advanced options are hidden away.

Return Value

Return Type
TextStyleAdvanced<!– ThinkGeo.MapSuite.Core.TextStyleAdvanced –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

AllowLineCarriage

This property gets and sets whether the labeler will allow carriage returns to be inserted.

Remarks

This property enables the labeler to split long labels into multiple lines if need be. For instance, if you have a lake whose name is “Southern Homestead Lake,” then the labeler may try and break the name onto multiple lines in order to better label the feature.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

BestPlacement

This property gets and sets whether the labeler will attempt to change the label position to avoid overlapping for point-based features.

Remarks

The positioning of point labels is mainly determined by the PointPlacement property. This allows you place the text to the right, top, bottom, etc. of the point. In some cases, placing the text in a certain place will cause many labels to be suppressed when the points are dense. This property allows you to override the PointPlacement property and allow the labeler to try other locations, if the default location would cause the label to be suppressed.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

CustomTextStyles

This property returns a collection of area styles allowing you to stack multiple area styles on top of each other.

Remarks

Using this collection, you can stack multiple area styles on top of each other. When we draw the features, we will draw them in order that they exist in the collection. You can use these stacks to create drop shadow effects, multiple colored outlines, etc.

Return Value

Return Type
Collection<TextStyle><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.Core.TextStyle} –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

DateFormat

This property gets and sets the format that will be applied to the text which can be parsed to DateTime type.

Remarks

With this property, you can apply formats to the text that is retrieved from the feature.

Return Value

Return Type
String<!– System.String –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

DrawingLevel

Gets or sets the DrawingLavel for this style.

Return Value

Return Type
DrawingLevel<!– ThinkGeo.MapSuite.Core.DrawingLevel –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

DuplicateRule

This property gets and sets the rule that determines how duplicate labels are handled.

Remarks

There are three ways to handle duplicate label names. The first is to suppress all duplicates, which means if there are two street segments with the same name then only one will be drawn. The second way is to suppress duplicate labels only if they are in one quarter of the screen. In this way, the screen will be divided into four quadrants, and if the two duplicate labels are in different quadrants, then they will both draw. The last way is to draw all duplicates.

Return Value

Return Type
LabelDuplicateRule<!– ThinkGeo.MapSuite.Core.LabelDuplicateRule –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

Filters

Return Value

Return Type
Collection<String><!– System.Collections.ObjectModel.Collection{System.String} –>

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

FittingLineInScreen

This property gets and sets whether the labeler will try to fit the label as best as it can on the visible part of a line on the screen.

Remarks

A label will normally be displayed in the center of a line. If only a small piece of the line is visible on the screen, we cannot see it's label by default. If we set this property to ture though, the label will be displayed in the center of that piece in screen.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

FittingPolygon

This property gets and sets whether the labeler will try to fit the label as best as it can within the boundary of a polygon.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

FittingPolygonFactor

This property gets and sets the factor to which it will keep the label inside of the polygon.

Return Value

Return Type
Double<!– System.Double –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

FittingPolygonInScreen

This property gets and sets whether the labeler will try to fit the label as best as it can on the visible part of a polygon on the screen.

Remarks

A label will normally be displayed in the center of a polygon. If only a small piece of the polygon is visible on the screen, we cannot see it's label by default. If we set this property to ture though, the label will be displayed in the center of that piece in screen.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

Font

This property gets and sets the font that will be used to draw the text.

Return Value

Return Type
GeoFont<!– ThinkGeo.MapSuite.Core.GeoFont –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

ForceHorizontalLabelForLine

This property gets and sets whether we should force horizontal labeling for lines.

Remarks

Normally, lines are labeled in the direction of the line. There may be some cases, however, when you want to have the line labeled horizontally regardless of the line's direction. In such a case, you can set this property to force the lines to be labeled horizontally.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

ForceLineCarriage

This property gets and sets whether the labeler will force carriage returns to be inserted.

Remarks

This property forces the labeler to split long labels into multiple lines. For instance, if you have a lake whose name is “Southern Homestead Lake,” then the labeler will break the name onto multiple lines in order to better label the feature.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

GridSize

This property gets and sets the grid size used for deterministic labeling.

Remarks

The grid size determines how many labels will be considered as candidates for drawing. The smaller the grid size, the higher the density of candidates. Making the grid size too small may have a performance impact.

Return Value

Return Type
Int32<!– System.Int32 –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

HaloPen

This property gets and sets the halo pen you may use to draw a halo around the text.

Remarks

The halo pen allows you to draw a halo effect around the text, making it stand out more on a busy background.

Return Value

Return Type
GeoPen<!– ThinkGeo.MapSuite.Core.GeoPen –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

IconFilePathName

This property gets and sets the filename and path for the image you want to use in the style.

Remarks

You can also optionally use the IconImage property if the image you want to use is derived from a stream.

Return Value

Return Type
String<!– System.String –>

<!– ThinkGeo.MapSuite.Core.IconStyle –> Go Back

IconImage

This property gets and sets the GeoImage you want to use for the image.

Remarks

You will typically want to use this property if your image is derived from a stream. Otherwise, you can use the IconFilePathName property to specify where the icon is located and we will handle the rest.

Return Value

Return Type
GeoImage<!– ThinkGeo.MapSuite.Core.GeoImage –>

<!– ThinkGeo.MapSuite.Core.IconStyle –> Go Back

IconImageScale

This property gets and sets the scale of the image you want to draw.

Remarks

This property allows you to scale the image up and down depending on how large or small you want it. It can be changed dynamically, so you could change it at every scale level to resize the bitmap based on the current scale. A scale of 1 would be the original size, while a scale of 2 would double the size. A scale of .5 would reduce the size of the image by half, and so on.

Return Value

Return Type
Double<!– System.Double –>

<!– ThinkGeo.MapSuite.Core.IconStyle –> Go Back

IsActive

This property gets and sets the active status of the style.

Remarks

If the style is not active then it will not draw.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

IsHaloEnable

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.IconTextStyle –> Go Back

IsMaskEnable

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.IconTextStyle –> Go Back

LabelAllLineParts

This property gets and sets whether the labeler will label every part of a multi-part line.

Remarks

In some cases, you may want to label all of the parts of a multi-part line, while in other cases you may not.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

LabelAllPolygonParts

This property gets and sets whether the labeler will label every part of a multi-part polygon.

Remarks

In some cases, you may want to label all of the parts of a multi-part polygon, while in other cases you may not. For example, you may have a series of lakes where you do want to label each polygon. In another case, you may have a country with many small islands and in this case you only want to label the largest polygon.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

LabelPositions

Gets a value represents a keyValuepair which is a feature id and label position of the feature

Return Value

Return Type
Dictionary<String,WorldLabelingCandidate><!– System.Collections.Generic.Dictionary{System.String,ThinkGeo.MapSuite.Core.WorldLabelingCandidate} –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

Mask

This property gets and sets the AreaStyle used to draw a mask behind the text.

Remarks

A mask is a plate behind the text that is rectangular and slightly larger than the width and height of the text. It allows the label to stand out well on a busy background. You can also try the HaloPen property instead of the mask, if the mask effect is too pronounced.

Return Value

Return Type
AreaStyle<!– ThinkGeo.MapSuite.Core.AreaStyle –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

MaskMargin

This property gets and sets the margin around the text that will be used for the mask.

Remarks

This determines how much larger the mask is than the text, in pixels.

Return Value

Return Type
Int32<!– System.Int32 –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

Name

This property gets and set the name of the style.

Remarks

This name is not used by the system; it is only for the developer. However, it can be used if you generate your own legend.

Return Value

Return Type
String<!– System.String –>

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

NumericFormat

This property gets and sets the format that will be applied to the text which can be parsed to double type.

Remarks

With this property, you can apply formats to the text that is retrieved from the feature.

Return Value

Return Type
String<!– System.String –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

OverlappingRule

This property gets and sets the rule that determines how overlapping labels are handled.

Remarks

This defines the rules for label overlapping. Currently, either we allow overlapping or we do not. In the future, we may extend this to allow some percentage of partial overlapping.

Return Value

Return Type
LabelOverlappingRule<!– ThinkGeo.MapSuite.Core.LabelOverlappingRule –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

PointPlacement

This property gets and sets the location of the label for point features relative to the point.

Remarks

This property allows you to choose where the labels are created relative to the point. For example, you can set the property to RightCenter, which would ensure that all labels are placed to the right of and vertically centered with the point. Different kinds of point layers can be positioned differently. If the point layer is dense and position is not a main concern, then you can try the BestPlacement property. That property overrides this property and tries to fit the label in the best location so that the minimum number of labels are suppressed due to overlapping issues.

Return Value

Return Type
PointPlacement<!– ThinkGeo.MapSuite.Core.PointPlacement –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

PolygonLabelingLocationMode

This property gets and sets the mode that determines how to locate polygon's labeling

Remarks

There are two ways to handle polygon's labeling location. The first is to use polygon's centroid as the labeling location, the second way is to use polygon's boungdingbox center as the labeling location.

Return Value

Return Type
PolygonLabelingLocationMode<!– ThinkGeo.MapSuite.Core.PolygonLabelingLocationMode –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

RequiredColumnNames

This property gets the collection of fields that are required for the style.

Remarks

This property gets the collection of fields that are required for the style. These are in addition to any other columns you specify in styles that inherit from this one. For example, if you have use a ValueStyle and it requires a column name for the value comparison, then that column does not need to be in this collection. You only use the RequiredColumnNames for columns you need beyond those required by specific inherited styles.

Return Value

Return Type
Collection<String><!– System.Collections.ObjectModel.Collection{System.String} –>

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

RotationAngle

This property gets and sets the rotation angle of the item being positioned.

Return Value

Return Type
Double<!– System.Double –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

SplineType

Gets or sets the SplineType for labeling.

Return Value

Return Type
SplineType<!– ThinkGeo.MapSuite.Core.SplineType –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

SuppressPartialLabels

This property gets and sets whether a partial label in the current extent will be drawn or not.

Remarks

This property provides a solution to the “cut off” label issue in Map Suite Web Edition and Desktop Edition, which occurs when multiple tiles exist. When you set this property to true, any labels outside of the current extent will not be drawn.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.IconStyle –> Go Back

TextColumnName

This property gets and sets the column name in the data that you want to get the text from.

Remarks

This property is used when retrieving text from a feature. You will want to specify the name of the column that contains the text you want to draw.

Return Value

Return Type
String<!– System.String –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

TextFormat

This property gets and sets the format that will be applied to the text.

Remarks

With this property, you can apply formats to the text that is retrieved from the feature.

Return Value

Return Type
String<!– System.String –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

TextLineSegmentRatio

This property gets and sets the ratio required for the label length to match the line length.

Remarks

This allows you to suppress labels where the label length would greatly exceed the line length. For example, if you set the ratio to 1, then the label will be suppressed if it is longer than the line. If the ratio is lower, then the label would need to be shorter than the line. If higher, then the label is allowed to run past the length of the line. This allows you to control the look of things like road labeling.

Return Value

Return Type
Double<!– System.Double –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

TextSolidBrush

This property gets and sets the SolidBrush that will be used to draw the text.

Remarks

You can use this property to draw a solid color; however, if you need to use other brushes, you can access them through the Advanced property of this class.

Return Value

Return Type
GeoSolidBrush<!– ThinkGeo.MapSuite.Core.GeoSolidBrush –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

XOffsetInPixel

This property gets and sets the X pixel offset for drawing each feature.

Remarks

This property allows you to specify an X offset. When combined with a Y offset, it is useful to allow you to achieve effects such as drop shadows, etc. There also may be times when you need to modify the location of feature data so as to better align it with raster satellite data.

Return Value

Return Type
Single<!– System.Single –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

YOffsetInPixel

This property gets and sets the Y pixel offset for drawing each feature.

Remarks

This property allows you to specify a Y offset. When combined with an X offset, it is useful to allow you to achieve effects such as drop shadows, etc. There also may be times when you need to modify the location of feature data so as to better align it with raster satellite data.

Return Value

Return Type
Single<!– System.Single –>

<!– ThinkGeo.MapSuite.Core.TextStyle –> Go Back

Protected Properties

AllowSpline

This property gets and sets whether line labels are allowed to spline around curved lines.

Remarks

This property will allow the labeler to spline the label around curved lines. This is useful for curved streets that need to be labeled. This can have a considerable performance impact, so we suggest you experiment with it to ensure it can meet your needs.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

FiltersCore

Return Value

Return Type
Collection<String><!– System.Collections.ObjectModel.Collection{System.String} –>

<!– ThinkGeo.MapSuite.Core.Style –> Go Back

Public Events

Formatted

Event Arguments

Event Arguments
FormattedPositionStyleEventArgs<!– ThinkGeo.MapSuite.Core.FormattedPositionStyleEventArgs –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

Formatting

Event Arguments

Event Arguments
FormattingPositionStyleEventArgs<!– ThinkGeo.MapSuite.Core.FormattingPositionStyleEventArgs –>

<!– ThinkGeo.MapSuite.Core.PositionStyle –> Go Back

NOTOC MapSuiteCore ThinkGeo.MapSuite.Core UpdateDocumentation

thinkgeo.mapsuite.core.icontextstyle.txt · Last modified: 2017/03/16 21:59 (external edit)