Skip to content

BackgroundOverlay

Namespace: ThinkGeo.Core

This class inherits from the Overlay abstract class. The specified overlay specifies the background information of the MapControl.

public class BackgroundOverlay : Overlay, System.IDisposable

Inheritance ObjectOverlayBackgroundOverlay
Implements IDisposable

Properties

BackgroundBrush

Gets or sets the background brush for the MapControl.

public GeoBrush BackgroundBrush { get; set; }

Property Value

GeoBrush

CanRefreshRegion

public bool CanRefreshRegion { get; protected set; }

Property Value

Boolean

IsBase

public bool IsBase { get; set; }

Property Value

Boolean

Name

Gets or sets the name of this overaly.

public string Name { get; set; }

Property Value

String

MapArguments

Gets or sets current map information which will be used for calculating mechanism.

public MapArguments MapArguments { get; set; }

Property Value

MapArguments

OverlayCanvas

Gets or sets the actual canvas which maintains all the visual elements on the overlay.

public Canvas OverlayCanvas { get; set; }

Property Value

Canvas

DrawingExceptionMode

This property gets and sets the DrawingExceptionMode used when an exception occurs during drawing.

public DrawingExceptionMode DrawingExceptionMode { get; set; }

Property Value

DrawingExceptionMode

IsVisible

Gets or sets if this overlay is visible.

public bool IsVisible { get; set; }

Property Value

Boolean

Attribution

public string Attribution { get; set; }

Property Value

String

IsEmpty

This property gets if this overlay is empty or not.

public bool IsEmpty { get; }

Property Value

Boolean

Remarks:

This property enhances the performance of the overlay while drawing. If is true, we will skip drawing this overlay and continue drawing the next overlay.

AutoRefreshInterval

public TimeSpan AutoRefreshInterval { get; set; }

Property Value

TimeSpan

Methods

DrawAsyncCore(RectangleShape, OverlayRefreshType, CancellationToken)

This method override the DrawCore logic of the Overlay class.

protected Task DrawAsyncCore(RectangleShape targetExtent, OverlayRefreshType refreshType, CancellationToken cancellationToken)

Parameters

targetExtent RectangleShape
This parameter specifies the extent for drawing this overlay.

refreshType OverlayRefreshType
This parameter specifies whether this overlay need to be clear and refresh or not.

cancellationToken CancellationToken

Returns

Task

SaveStateCore()

This method saves overlay state to a byte array.

protected Byte[] SaveStateCore()

Returns

Byte[]
A byte array indicates current overlay state.

LoadStateCore(Byte[])

This method restore the overlay state back from the specified state.

protected void LoadStateCore(Byte[] state)

Parameters

state Byte[]
This parameter indicates the state for restore the overlay.

Events

Drawing

This event raises before the overlay is drawing.

public event EventHandler<DrawingOverlayEventArgs> Drawing;

Drawn

This event raises after the overlay is drawn.

public event EventHandler<DrawnOverlayEventArgs> Drawn;

DrawingAttribution

public event EventHandler<DrawingAttributionOverlayEventArgs> DrawingAttribution;

DrawnAttribution

public event EventHandler<DrawnAttributionOverlayEventArgs> DrawnAttribution;

ThrowingException

public event EventHandler<ThrowingExceptionOverlayEventArgs> ThrowingException;