User Tools

Site Tools


thinkgeo.mapsuite.windowsphonecore.qualityfamilyareastyle

ThinkGeo.MapSuite.WindowsPhoneCore.QualityFamilyAreaStyle

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 –> This class is used to draw area features.

Remarks

You should use this class to draw area features. You can specify a base color and the number of colors you want based on that color to draw the interior, and you can specify an outline pen with which to draw the border. You can optionally choose to use only the outline pen or the fill brush to generate different effects.

Inheritance Hierarchy

Members Summary

Public Constructors

Name Parameters DeclaringType Summary
Public MethodQualityFamilyAreaStyle This is the constructor the for the class. If you use this constructor, then you need to set the required properties manually.
Public MethodQualityFamilyAreaStyle GeoPen, GeoColor, Int32 This is the constructor the for the class.
Public MethodQualityFamilyAreaStyle GeoPen, GeoColor, Int32, PenBrushDrawingOrder This is the constructor the for the class.

Protected Constructors

Name Parameters DeclaringType Summary

Public Methods

Name Parameters DeclaringType Summary
Public MethodClearCache This method clears the cached style in the cache.
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, DrawingRectangleF Style
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 MethodToString Object

Protected Methods

Name Parameters DeclaringType Summary
Protected MethodDrawCore IEnumerable<Feature>, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate> Style(overriden) This method draws the features on the canvas you provided.
Protected MethodDrawSampleCore GeoCanvas, DrawingRectangleF Style(overriden)
Protected MethodFinalize Object
Protected MethodGetRequiredColumnNamesCore Style This method returns the column data for each feature that is required for the style to properly draw.
Protected MethodMemberwiseClone Object

Public Properties

Name Return DeclaringType Summary
Public PropertyAdvanced AreaStyleAdvanced AreaStyle This property lets you access the advanced properties of the style.
Public PropertyBaseColor GeoColor This gets or sets the base color of the style.
Public PropertyCache Dictionary<String,AreaStyle> This gets the cached style in the class.
Public PropertyCustomAreaStyles Collection<AreaStyle> AreaStyle This property returns a collection of area styles, allowing you to stack multiple area styles on top of each other.
Public PropertyFillSolidBrush GeoSolidBrush AreaStyle This property gets and sets the solid brush you want to use to fill in the area features.
Public PropertyIsActive Boolean Style This property gets and sets the active status of the style.
Public PropertyName String Style This property gets and set the name of the style.
Public PropertyNumberOfColors Int32 This gets or sets the number of colors in the style.
Public PropertyOutlinePen GeoPen AreaStyle This property gets and sets the outline pen you want to use to outline the features.
Public PropertyPenBrushDrawingOrder PenBrushDrawingOrder AreaStyle This property gets and sets the pen and brush drawing order.
Public PropertyRequiredColumnNames Collection<String> Style This property gets the collection of fields that are required for the style.
Public PropertyXOffsetInPixel Single AreaStyle This property gets and sets the X pixel offset for drawing each feature.
Public PropertyYOffsetInPixel Single AreaStyle This property gets and sets the Y pixel offset for drawing each feature.

Protected Properties

Name Return DeclaringType Summary

Public Events

Name Event Arguments DeclaringType Summary

Public Constructors

QualityFamilyAreaStyle()

This is the constructor the for the class. If you use this constructor, then you need to set the required properties manually.

Overloads

This is the default constructor.

Parameters

Name Type Description

Go Back

QualityFamilyAreaStyle(GeoPen, GeoColor, Int32)

This is the constructor the for the class.

Overloads

This is the constructor for this class.

Parameters

Name Type Description
outlinePen GeoPen<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoPen –> This parameter represents the outline pen that will be used on the style.
baseColor GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This parameter represents the base color that will be used in the class.
numberOfColors Int32<!– System.Int32 –> This prameter represents how many colors will be used in the style, based on the base color.

Go Back

QualityFamilyAreaStyle(GeoPen, GeoColor, Int32, PenBrushDrawingOrder)

This is the constructor the for the class.

Overloads

This is the constructor for this class.

Parameters

Name Type Description
outlinePen GeoPen<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoPen –> This parameter represents the outline pen that will be used on the style.
baseColor GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –> This parameter represents the base color that will be used in the class.
numberOfColors Int32<!– System.Int32 –> This prameter represents how many colors will be used in the style, based on the base color.
penBrushDrawingOrder PenBrushDrawingOrder<!– ThinkGeo.MapSuite.WindowsPhoneCore.PenBrushDrawingOrder –> This parameter describes the PenBrushDrawingOrder that will be used when drawing the area type feature.

Go Back

Protected Constructors

Public Methods

ClearCache()

This method clears the cached style in the cache.

Remarks

This method clears the cached style in the cache.

Return Value

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

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.WindowsPhoneCore.QualityFamilyAreaStyle –> 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.WindowsPhoneCore.Feature} –> This parameter represents the features you want to draw on the canvas.
canvas GeoCanvas<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas –> This parameter represents the canvas you want to draw the features on.
labelsInThisLayer Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate} –> The labels will be drawn in the current layer only.
labelsInAllLayers Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate} –> The labels will be drawn in all layers.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.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.WindowsPhoneCore.BaseShape} –> This parameter represents the shapes you want to draw on the canvas.
canvas GeoCanvas<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas –> This parameter represents the canvas you want to draw the shapes on.
labelsInThisLayer Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate} –> The labels will be drawn in the current layer only.
labelsInAllLayers Collection<SimpleCandidate><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate} –> The labels will be drawn in all layers.

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

DrawSample(GeoCanvas, DrawingRectangleF)

Return Value

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

Parameters

Name Type Description
canvas GeoCanvas<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas –>
drawingExtent DrawingRectangleF<!– ThinkGeo.MapSuite.WindowsPhoneCore.DrawingRectangleF –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.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.WindowsPhoneCore.Style –> 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

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

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

Parameters

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

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

DrawSampleCore(GeoCanvas, DrawingRectangleF)

Return Value

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

Parameters

Name Type Description
canvas GeoCanvas<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas –>
drawingExtent DrawingRectangleF<!– ThinkGeo.MapSuite.WindowsPhoneCore.DrawingRectangleF –>

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

Finalize()

Return Value

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

Parameters

Name Type Description

<!– System.Object –> Go Back

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

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.WindowsPhoneCore.Style –> Go Back

MemberwiseClone()

Return Value

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

Parameters

Name Type Description

<!– System.Object –> Go Back

Public Properties

Advanced

This property lets you access the advanced properties of the style.

Remarks

This property lets you access the advanced properties of the style.

Return Value

Return Type
AreaStyleAdvanced<!– ThinkGeo.MapSuite.WindowsPhoneCore.AreaStyleAdvanced –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.AreaStyle –> Go Back

BaseColor

This gets or sets the base color of the style.

Remarks

None.

Return Value

Return Type
GeoColor<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeoColor –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.QualityFamilyAreaStyle –> Go Back

Cache

This gets the cached style in the class.

Remarks

This gets the cached style in the class. The key of the style in the cache is feature.Id &amp; feature.GetHashCode().

Return Value

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

<!– ThinkGeo.MapSuite.WindowsPhoneCore.QualityFamilyAreaStyle –> Go Back

CustomAreaStyles

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<AreaStyle><!– System.Collections.ObjectModel.Collection{ThinkGeo.MapSuite.WindowsPhoneCore.AreaStyle} –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.AreaStyle –> Go Back

FillSolidBrush

This property gets and sets the solid brush you want to use to fill in the area features.

Remarks

This solid brush is used to fill in the area features that will draw. You can also optionally specify an outline pen to give the area an outline. The default solid brush has a fill color of transparent, which means it will not draw anything.

Return Value

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

<!– ThinkGeo.MapSuite.WindowsPhoneCore.AreaStyle –> 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.WindowsPhoneCore.Style –> 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.WindowsPhoneCore.Style –> Go Back

NumberOfColors

This gets or sets the number of colors in the style.

Remarks

None.

Return Value

Return Type
Int32<!– System.Int32 –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.QualityFamilyAreaStyle –> Go Back

OutlinePen

This property gets and sets the outline pen you want to use to outline the features.

Remarks

This outline pen is used to outline the features that will draw. You can also optionally specify a fill brush to give the area a solid fill. The default outline pen color is transparent, which means it will not draw anything.

Return Value

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

<!– ThinkGeo.MapSuite.WindowsPhoneCore.AreaStyle –> Go Back

PenBrushDrawingOrder

This property gets and sets the pen and brush drawing order.

Remarks

This property controls whether the outline pen or the fill brush is drawn first. The default is for the fill brush to be drawn first. If you have the outline pen draw first then the thickness of the pen will be smaller, creating a subtle but noticeable effect.

Return Value

Return Type
PenBrushDrawingOrder<!– ThinkGeo.MapSuite.WindowsPhoneCore.PenBrushDrawingOrder –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.AreaStyle –> 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.WindowsPhoneCore.Style –> 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 enables 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 align it with raster satellite data.

Return Value

Return Type
Single<!– System.Single –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.AreaStyle –> 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 enables 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 align it with raster satellite data.

Return Value

Return Type
Single<!– System.Single –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.AreaStyle –> Go Back

Protected Properties

Public Events

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