User Tools

Site Tools


thinkgeo.mapsuite.portablecore.scalebaradornmentlayer

ThinkGeo.MapSuite.Core.ScaleBarAdornmentLayer

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.

The ScaleBarAdornmentLayer class allows you show a bar graphic on the map that displays the distance scale for the current map extent.

Inheritance Hierarchy

  • System.Object
    • ThinkGeo.MapSuite.Core.Layer
      • ThinkGeo.MapSuite.Core.AdornmentLayer
        • ThinkGeo.MapSuite.Core.ScaleBarAdornmentLayer

Members Summary

Public Constructors

ScaleBarAdornmentLayer()

  • Creates a new instance of the ScaleBarAdornmentLayer class.
Remarks
  • When displaying a ScaleBarAdornmentLayer, we need to instance a ScaleLineAdornmentLayer and add it to MapEngine. The ScaleBar will not be drawn when the CurrentExtent is outside of the world Extent(-90,180-,90,-180).
Parameters

Protected Constructors

Public Methods

GetDrawingLocation(GeoCanvas,Single,Single)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • adornmentWidth
    • Type:Single
    • Description:N/A
  • adornmentHeight
    • Type:Single
    • Description:N/A

GetThreadSafetyLevel()

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

CloneDeep()

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

Open()

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

Close()

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

GetBoundingBox()

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

Draw(GeoCanvas,Collection<SimpleCandidate>)

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

RequestDrawing()

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

RequestDrawing(RectangleShape)

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

RequestDrawing(IEnumerable<RectangleShape>)

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

RequestDrawing(TimeSpan)

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

RequestDrawing(RectangleShape,TimeSpan)

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

RequestDrawing(IEnumerable<RectangleShape>,TimeSpan)

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

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

UpdateScale(GeoCanvas,GeographyUnit)

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

DrawCore(GeoCanvas,Collection<SimpleCandidate>)

  • This method draws the Layer.
Remarks
  • This abstract method is called from the concrete public method Draw. This method draws the representation of the layer based on the extent you provided. 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
  • canvas
    • Type:GeoCanvas
    • Description:This parameter is the canvas object or a GeoImage to draw on.
  • labelsInAllLayers
    • Type:Collection<SimpleCandidate>
    • Description:This parameter represents the labels used for collision detection and duplication checking.

OnRequestingDrawing(RequestingDrawingLayerEventArgs)

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

GetThreadSafetyLevelCore()

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

CloneDeepCore()

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

OpenCore()

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

CloseCore()

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

GetBoundingBoxCore()

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

DrawException(GeoCanvas,Exception)

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

DrawExceptionCore(GeoCanvas,Exception)

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

OnDrawingException(DrawingExceptionLayerEventArgs)

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

OnDrawnException(DrawnExceptionLayerEventArgs)

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

DrawAttributionCore(GeoCanvas,String)

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

OnDrawingAttribution(DrawingAttributionLayerEventArgs)

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

OnDrawnAttribution(DrawnAttributionLayerEventArgs)

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

OnDrawingProgressChanged(DrawingProgressChangedEventArgs)

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

OnRequestedDrawing(RequestedDrawingLayerEventArgs)

  • 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

ProjectionToDecimalDegrees

  • Gets or sets a Proj4 projection parameter string which shows what coordinate system the map is using.
Remarks
  • N/A
Return Value

ProjectionParametersString

  • Gets or sets a Proj4 projection parameter string which shows what coordinate system the map is using.
Remarks
  • N/A
Return Value
  • Type:String

DisplayUnitString

  • This propery is a dictionary that exposes what text will be drawn to represent the ScaleLine Unit.
Remarks
  • We will display different letters for different units of measure; for example: “m” for meters, “ft” for feet, etc.
Return Value
  • Type:Dictionary<String,String>

UnitFamily

  • Gets or sets the UnitSystem (Imperial/Metric) to be used for the ScaleBar.
Remarks
  • By setting this property, you can control whether to use a metric or imperial measurement system for the ScaleBar.
Return Value

Thickness

  • Gets or sets the thickness of the ScaleBar. It is an integer value representing the height of the ScaleBar in screen units.
Remarks
  • N/A
Return Value
  • Type:Int32

MaxWidth

  • Gets or Sets the MaxWidth of the ScaleBar.
Remarks
  • You can use this property to set the maximum width that you want the ScaleBar to occupy on the map. The ScaleBarAdornmentLayer will automatically adjust its size based upon the current extent of the map. By setting this property, you can control the maximum width the ScaleBar will occupy on the map.
Return Value
  • Type:Int32

BarBrush

  • The property is the GeoBrush that will be used to draw the ScaleBar.
Remarks
  • This BarBrush property will give you full control over the appearance of the ScaleBarAdornmentLayer.
Return Value

TextStyle

  • N/A
Remarks
  • N/A
Return Value

AlternateBarBrush

  • The property is the GeoBrush that will be used to draw the alternate ScaleBar.
Remarks
  • This AlternateBarBrush property will give you full control over the appearance of the ScaleBarAdornmentLayer.
Return Value

MaskBrush

  • Gets or sets the color for the ScaleBarAdornmentLayer's mask, if the HasMask property is set to true.
Remarks
  • N/A
Return Value

HasMask

  • Gets or sets whether the ScaleBar will have a mask or not. A boolean value representing whether or not a mask is shown.
Remarks
  • Depending upon the look of your map and your requirements, you may or may not want a mask on the ScaleBar. You can control whether or not the ScaleBar has a mask by setting this property. If you set the HasMask property to true, be sure to specify a mask color (or texture) by using the MaskBrush property.
Return Value
  • Type:Boolean

MaskContour

  • Gets or sets the pen for the outline of the ScaleBar mask.
Remarks
  • By using this property you can control the border of the mask, if the HasMask property is set to true. If you do not want a contour or border to show, you should set the pen to transparent.
Return Value

BarPen

  • N/A
Remarks
  • N/A
Return Value

Width

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

Height

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

BackgroundMask

  • N/A
Remarks
  • N/A
Return Value

Location

  • N/A
Remarks
  • N/A
Return Value

XOffsetInPixel

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

YOffsetInPixel

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

IsOpen

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

HasBoundingBox

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

DrawingTime

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

Name

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

IsVisible

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

Transparency

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

IsNegative

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

IsGrayscale

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

DrawingExceptionMode

  • N/A
Remarks
  • N/A
Return Value

Attribution

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

RequestDrawingInterval

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

Protected Properties

ActualWidth

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

IsOpenCore

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

Public Events

DrawingException

  • N/A
Remarks
  • N/A

Event Arguments:DrawingExceptionLayerEventArgs

DrawingProgressChanged

  • N/A
Remarks
  • N/A

Event Arguments:DrawingProgressChangedEventArgs

DrawnException

  • N/A
Remarks
  • N/A

Event Arguments:DrawnExceptionLayerEventArgs

DrawingAttribution

  • N/A
Remarks
  • N/A

Event Arguments:DrawingAttributionLayerEventArgs

DrawnAttribution

  • N/A
Remarks
  • N/A

Event Arguments:DrawnAttributionLayerEventArgs

RequestedDrawing

  • N/A
Remarks
  • N/A

Event Arguments:RequestedDrawingLayerEventArgs

RequestingDrawing

  • N/A
Remarks
  • N/A

Event Arguments:RequestingDrawingLayerEventArgs

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