Skip to content

Overlay

Namespace: ThinkGeo.UI.WebApi

Provides base functionality for WebApi overlays, including drawing lifecycle hooks and exception handling.

public abstract class Overlay

Inheritance ObjectOverlay

Properties

Id

Gets the identifier that external callers can use to reference this overlay.

public string Id { get; }

Property Value

String
Overlay identifier supplied at construction.

IsVisible

Gets or sets a value indicating whether this overlay participates in draw requests.

public bool IsVisible { get; set; }

Property Value

Boolean
true when the overlay should render; otherwise, false.

DrawingExceptionMode

Gets or sets the strategy used when an exception occurs while drawing.

public DrawingExceptionMode DrawingExceptionMode { get; set; }

Property Value

DrawingExceptionMode
One of the values.

Methods

Draw(GeoCanvas)

Renders the overlay onto the provided while honoring Overlay.DrawingExceptionMode and raising lifecycle events.

public void Draw(GeoCanvas geoCanvas)

Parameters

geoCanvas GeoCanvas
Canvas that receives the overlay output.

DrawCore(GeoCanvas)

When overridden in a derived class, draws the overlay contents onto the supplied canvas.

protected abstract void DrawCore(GeoCanvas geoCanvas)

Parameters

geoCanvas GeoCanvas
Canvas to receive the overlay output.

DrawException(GeoCanvas, Exception)

Handles draw failures by delegating to .

protected void DrawException(GeoCanvas geoCanvas, Exception e)

Parameters

geoCanvas GeoCanvas
Canvas that should display the fallback visual.

e Exception
Exception that caused the draw operation to fail.

DrawExceptionCore(GeoCanvas, Exception)

Provides the overridable implementation that renders a diagnostic placeholder when drawing fails.

protected void DrawExceptionCore(GeoCanvas geoCanvas, Exception e)

Parameters

geoCanvas GeoCanvas
Canvas that should display the fallback visual.

e Exception
Exception that caused the draw operation to fail.

OnDrawing(DrawingOverlayEventArgs)

Raises the Overlay.Drawing event before drawing so subscribers can inspect or cancel rendering.

protected void OnDrawing(DrawingOverlayEventArgs e)

Parameters

e DrawingOverlayEventArgs
Event data describing the pending draw operation.

OnDrawn(DrawnOverlayEventArgs)

Raises the Overlay.Drawn event after drawing so subscribers can perform post-processing.

protected void OnDrawn(DrawnOverlayEventArgs e)

Parameters

e DrawnOverlayEventArgs
Event data that references the completed draw.

Events

Drawing

Raised before the overlay begins drawing.

public event EventHandler<DrawingOverlayEventArgs> Drawing;

Drawn

Raised after the overlay finishes drawing.

public event EventHandler<DrawnOverlayEventArgs> Drawn;