Class AdornmentLayer
This is the base class of AdornmentLayers. The AdornmentLayer is used to place adornments on the map. Two types of AdornmentLayers are provided: ScaleLineAdornmentLayer and ScaleBarAdornmentLayer.
public abstract class AdornmentLayer : Layer
- Inheritance
-
AdornmentLayer
- Derived
- Inherited Members
Constructors
AdornmentLayer()
This method is the default constructor for the AdornmentLayer.
protected AdornmentLayer()
Remarks
None
Properties
BackgroundMask
public AreaStyle BackgroundMask { get; set; }
Property Value
Height
public float Height { get; set; }
Property Value
Location
This property gets and sets the drawing location of the AdornmentLayer.
public AdornmentLocation Location { get; set; }
Property Value
Width
public float Width { get; set; }
Property Value
XOffsetInPixel
This property gets and sets the X pixel offset for the AdornmentLayer.
public float XOffsetInPixel { get; set; }
Property Value
Remarks
This property allows you to specify an X offset. It is useful, when combined with a Y offset, to do things like modify the location of the adornment.
YOffsetInPixel
This property gets and sets the Y pixel offset for the AdornmentLayer.
public float YOffsetInPixel { get; set; }
Property Value
Remarks
This property allows you to specify a Y offset. It is useful, when combined with an X offset, to do things like modify the location of the adornment.
Methods
DrawCore(GeoCanvas, Collection<SimpleCandidate>)
This method draws the AdornmentLayer.
protected override void DrawCore(GeoCanvas canvas, Collection<SimpleCandidate> labelsInAllLayers)
Parameters
canvas
GeoCanvasThis parameter is the view object (or a NativeImage) to draw on.
labelsInAllLayers
Collection<SimpleCandidate>This parameter represents the labels used for collision detection and duplication checking.
Remarks
This virtual method is called from the concrete public method Draw. This method
draws the representation of the layer based on the extent you provided.
You can use the full power of the GeoCanvas to do the drawing.
Exceptions
- ArgumentNullException
If you pass a null as the geoCanvas, we will throw an ArgumentNullException.
- ArgumentNullException
If you pass a null as the labelsInAllLayers, we will throw an ArgumentNullException.
GetDrawingLocation(GeoCanvas, float, float)
This method returns the drawing location of the AdornmentLayer.
public virtual ScreenPointF GetDrawingLocation(GeoCanvas canvas, float adornmentWidth, float adornmentHeight)
Parameters
canvas
GeoCanvasThis parameter is the view used in drawing.
adornmentWidth
floatThis parameter is the width of the adornment.
adornmentHeight
floatThis parameter is the height of the adornment
Returns
- ScreenPointF
It returns the upper left screen point of where the AdornmentLayer will be drawn.