User Tools

Site Tools


thinkgeo.mapsuite.portablecore.style

ThinkGeo.MapSuite.Core.Style

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 abstract class is the root for all styles used for drawing features.

Inheritance Hierarchy

Members Summary

Public Constructors

Protected Constructors

Style()

  • This is the default constructor for the style and should be called by inherited classes.
Remarks
  • This is the default constructor for the style and should be called by inherited classes.
Parameters

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
  • Type:Style
  • Description:A cloned style.
Parameters

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
  • 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.

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
  • Type:Void
  • Description:None
Parameters
  • shapes
    • Type:IEnumerable<BaseShape>
    • Description:This parameter represents the shapes you want to draw on the canvas.
  • canvas
    • Type:GeoCanvas
    • Description:This parameter represents the canvas you want to draw the shapes 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.

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
  • Type:Collection<String>
  • Description:This method returns a collection of column names that the style needs.
Parameters

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
  • Type:Void
  • Description:None
Parameters
  • canvas
    • Type:GeoCanvas
    • Description:This parameter represents the canvas you want to draw the features on.

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

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
  • Type:Style
  • Description:A cloned style.
Parameters

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

  • This method draws the features on the canvas you provided.
Remarks
  • This abstract 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 implementing this abstract 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 column names that the style needs.
Parameters

DrawSampleCore(GeoCanvas,DrawingRectangleF)

  • This method draws a sample feature on the canvas you provided.
Remarks
  • This virtual method is called from the concrete public method Draw. 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. When implementing this virtual method, consider the canvas size and draw the sample image appropriately. You should keep in mind that the sample typically shows up on a legend.
Return Value
  • Type:Void
  • Description:None
Parameters
  • canvas
    • Type:GeoCanvas
    • Description:This parameter represents the canvas you want to draw the features on.

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

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

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

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

Filters

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

Protected Properties

FiltersCore

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

Public Events

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