User Tools

Site Tools


thinkgeo.mapsuite.portablecore.iconstyle

ThinkGeo.MapSuite.Core.IconStyle

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.

This class displays an icon with text from the data of the feature.

Inheritance Hierarchy

  • System.Object
    • ThinkGeo.MapSuite.Core.Style
      • ThinkGeo.MapSuite.Core.PositionStyle
        • ThinkGeo.MapSuite.Core.TextStyle
          • ThinkGeo.MapSuite.Core.IconStyle

Members Summary

Public Constructors

IconStyle()

  • This is the constructor for the class.
Remarks
  • If you use this, then you should set the properties manually – such as the column name, font, solid brush and the image.
Parameters

IconStyle(String,String,GeoFont,GeoSolidBrush)

  • This is the constructor for the class.
Remarks
  • This constructor allows you to pass in the path to the icon, along with the column name, font and solid brush to use. This is the most commonly used constructor. If you need to use an image from a stream, then you should use the constructor that takes a GeoImage.
Parameters
  • iconPathFilename
    • Type:String
    • Description:This parameter is the path and filename of the icon you want to use.
  • textColumnName
    • Type:String
    • Description:This parameter is the column name from which to get the data for the text.
  • textFont
    • Type:GeoFont
    • Description:This parameter is the font used to draw the text on the icon.
  • textSolidBrush
    • Description:This parameter is the solid brush that is used to draw the text on the icon.

IconStyle(GeoImage,String,GeoFont,GeoSolidBrush)

  • This is the constructor for the class.
Remarks
  • This constructor allows you to use a GeoImage instead of specifying a path and filename of the icon. This is commonly used if the image comes from a stream.
Parameters
  • iconImage
    • Type:GeoImage
    • Description:This parameter is the image to use in this style.
  • textColumnName
    • Type:String
    • Description:This parameter is the column name from which to get the data for the text.
  • textFont
    • Type:GeoFont
    • Description:This parameter is the font used to draw the text on the icon.
  • textSolidBrush
    • Description:This parameter is the solid brush that is used to draw the text on the icon.

Protected Constructors

Public Methods

CloneDeep()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Style
  • Description:N/A
Parameters

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

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • features
    • Type:IEnumerable<Feature>
    • Description:N/A

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

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • shapes
    • Type:IEnumerable<BaseShape>
    • Description:N/A

GetRequiredColumnNames()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Collection<String>
  • Description:N/A
Parameters

DrawSample(GeoCanvas,DrawingRectangleF)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

DrawSample(GeoCanvas)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

ToString()

  • N/A
Remarks
  • N/A
Return Value
  • Type:String
  • Description:N/A
Parameters

Equals(Object)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean
  • Description:N/A
Parameters
  • obj
    • Type:Object
    • Description:N/A

GetHashCode()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters

GetType()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Type
  • Description:N/A
Parameters

Protected Methods

DrawSampleCore(GeoCanvas,DrawingRectangleF)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

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

  • This method draws the features on the canvas you provided.
Remarks
  • This overridden method is called from the concrete public method Draw. 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. When overriding this method, consider each feature and its column data values. You can use the full power of the GeoCanvas to do the drawing. If you need column data for a feature, be sure to override the GetRequiredColumnNamesCore and add the columns you need to the collection. 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.
Return Value
  • Type:Void
  • Description:None
Parameters
  • features
    • Type:IEnumerable<Feature>
    • Description:This parameter represents the features you want to draw on the canvas.
  • canvas
    • Type:GeoCanvas
    • Description:This parameter represents the canvas you want to draw the features on.
  • labelsInThisLayer
    • Type:Collection<SimpleCandidate>
    • Description:The labels will be drawn in the current layer only.
  • labelsInAllLayers
    • Type:Collection<SimpleCandidate>
    • Description:The labels will be drawn in all layers.

GetLabelingCandidateCore(Feature,GeoCanvas)

  • This method determines which labels will be candidates for drawing.
Remarks
  • This overridden method is called from the concrete public method GetLabelingCandidate. In this method, we determine if the feature passed in will be a candidate for drawing. If you have the grid method enabled, then we determine this by ensuring that only one label will be eligible per grid cell. In this way, we can ensure that labels always draw in the same place at the same scale.
Return Value
  • Type:Collection<LabelingCandidate>
  • Description:This method returns a collection of labeling candidates.
Parameters
  • feature
    • Type:Feature
    • Description:This parameter represents the features you want to draw on the canvas.
  • canvas
    • Type:GeoCanvas
    • Description:This parameter represents the canvas you want to draw the features on.

Format(String,BaseShape)

  • N/A
Remarks
  • N/A
Return Value
  • Type:String
  • Description:N/A
Parameters
  • text
    • Type:String
    • Description:N/A
  • labeledShape

FormatCore(String,BaseShape)

  • N/A
Remarks
  • N/A
Return Value
  • Type:String
  • Description:N/A
Parameters
  • text
    • Type:String
    • Description:N/A
  • labeledShape

OnFormatting(FormattingPositionStyleEventArgs)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

OnFormatted(FormattedPositionStyleEventArgs)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

GetRequiredColumnNamesCore()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Collection<String>
  • Description:N/A
Parameters

FilterFeatures(IEnumerable<Feature>,GeoCanvas)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Collection<Feature>
  • Description:N/A
Parameters
  • features
    • Type:IEnumerable<Feature>
    • Description:N/A

FilterFeaturesCore(IEnumerable<Feature>,GeoCanvas)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Collection<Feature>
  • Description:N/A
Parameters
  • features
    • Type:IEnumerable<Feature>
    • Description:N/A

GetLabelingCandidates(Feature,GeoCanvas)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • feature

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

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean
  • Description:N/A
Parameters

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

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean
  • Description:N/A
Parameters

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

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean
  • Description:N/A
Parameters

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

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean
  • Description:N/A
Parameters

GetLabelingCandidateForOnePolygon(PolygonShape,String,GeoCanvas)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • text
    • Type:String
    • Description:N/A

CloneDeepCore()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Style
  • Description:N/A
Parameters

Finalize()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

MemberwiseClone()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Object
  • Description:N/A
Parameters

Public Properties

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
  • Type:String

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

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
  • Type:Double

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
  • Type:Boolean

XOffsetInPixel

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single

YOffsetInPixel

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single

FittingLineInScreen

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

FittingPolygonInScreen

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

CustomTextStyles

  • N/A
Remarks
  • N/A
Return Value

RotationAngle

  • N/A
Remarks
  • N/A
Return Value
  • Type:Double

TextFormat

  • N/A
Remarks
  • N/A
Return Value
  • Type:String

NumericFormat

  • N/A
Remarks
  • N/A
Return Value
  • Type:String

DateFormat

  • N/A
Remarks
  • N/A
Return Value
  • Type:String

TextSolidBrush

  • N/A
Remarks
  • N/A
Return Value

Font

  • N/A
Remarks
  • N/A
Return Value

HaloPen

  • N/A
Remarks
  • N/A
Return Value

TextColumnName

  • N/A
Remarks
  • N/A
Return Value
  • Type:String

Mask

  • N/A
Remarks
  • N/A
Return Value

MaskMargin

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32

Advanced

  • N/A
Remarks
  • N/A
Return Value

ForceHorizontalLabelForLine

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

SplineType

  • N/A
Remarks
  • N/A
Return Value

DrawingLevel

  • N/A
Remarks
  • N/A
Return Value

LabelPositions

  • N/A
Remarks
  • N/A
Return Value

PolygonLabelingLocationMode

  • N/A
Remarks
  • N/A
Return Value

GridSize

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32

DuplicateRule

  • N/A
Remarks
  • N/A
Return Value

OverlappingRule

  • N/A
Remarks
  • N/A
Return Value

AllowLineCarriage

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

ForceLineCarriage

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

FittingPolygon

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

LabelAllPolygonParts

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

LabelAllLineParts

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

FittingPolygonFactor

  • N/A
Remarks
  • N/A
Return Value
  • Type:Double

TextLineSegmentRatio

  • N/A
Remarks
  • N/A
Return Value
  • Type:Double

BestPlacement

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

PointPlacement

  • N/A
Remarks
  • N/A
Return Value

MaskType

  • N/A
Remarks
  • N/A
Return Value

Name

  • N/A
Remarks
  • N/A
Return Value
  • Type:String

IsActive

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

RequiredColumnNames

  • N/A
Remarks
  • N/A
Return Value
  • Type:Collection<String>

Filters

  • N/A
Remarks
  • N/A
Return Value
  • Type:Collection<String>

Protected Properties

IsStyleDefault

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

AllowSpline

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

IsDefault

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

FiltersCore

  • N/A
Remarks
  • N/A
Return Value
  • Type:Collection<String>

Public Events

Formatting

  • N/A
Remarks
  • N/A

Event Arguments:FormattingPositionStyleEventArgs

Formatted

  • N/A
Remarks
  • N/A

Event Arguments:FormattedPositionStyleEventArgs

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