User Tools

Site Tools


thinkgeo.mapsuite.silverlightcore.regexstyle

ThinkGeo.MapSuite.SilverlightCore.RegexStyle

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 allows you to draw features differently based on regular expression matching.

Inheritance Hierarchy

  • System.Object
    • ThinkGeo.MapSuite.SilverlightCore.Style
      • ThinkGeo.MapSuite.SilverlightCore.RegexStyle

Members Summary

Public Constructors

RegexStyle()

  • This is a constructor for the class.
Remarks
  • If you use this constructor, you need to set the various properties manually.
Parameters

RegexStyle(String,Collection<RegexItem>)

  • This is a constructor for the class.
Remarks
  • None.
Parameters
  • columnName
    • Type:String
    • Description:This parameter is the columnName you want to use in the style.
  • regexItems
    • Type:Collection<RegexItem>
    • Description:This parameter specifies the regexItems in the style.

RegexStyle(String,Collection<RegexItem>,RegexMatching)

  • This is a constructor for the class.
Remarks
  • None.
Parameters
  • columnName
    • Type:String
    • Description:This parameter is the columnName you want to use in the style.
  • regexItems
    • Type:Collection<RegexItem>
    • Description:This parameter specifies the regexItems in the style.
  • regexMatching
    • Description:This parameter specifies the regexMatching rule for the style.

Protected Constructors

Public Methods

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

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

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.

GetRequiredColumnNamesCore()

  • This method returns the column data for each feature that is required for the style to properly draw.
Remarks
  • This abstract method is called from the concrete public method GetRequiredFieldNames. 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.
Return Value
  • Type:Collection<String>
  • Description:This method returns a collection of the column names that it needs.
Parameters

DrawSampleCore(GeoCanvas,DrawingRectangleF)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • 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

RegexMatchingRule

This property gets and sets the regular expression matching rule. The rule determines whether we match the entire string or just any portion of it.

Remarks

This is used to determine how much of a string needs to match a regular expression in order to declare it a match for that expression. Sometimes, you only need one part of the string to match in order for the expression to be considered a match; other times you may want the entire string to match.

Return Value

ColumnName

This property gets and sets the column name whose value will be tested against the regular expression.

Remarks

This is the column we use for matching.

Return Value
  • Type:String

RegexItems

This property gets the collection of RegexItems. Each item can have its own regular expression to match.

Remarks

You will want to add RegexItems to this collection. Each item can have its own style and matching string.

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>

Protected Properties

Public Events

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