Skip to content

LayersDrawingEventArgs

Namespace: ThinkGeo.Core

Provides data for the MapEngine.LayersDrawing event, which fires before any layer draws.

public class LayersDrawingEventArgs : System.EventArgs

Inheritance objectEventArgsLayersDrawingEventArgs

Remarks:

Use this event to cancel drawing, inspect or adjust the layers collection, or perform custom drawing before a layer renders.

Properties

Cancel

Gets or sets a value indicating whether drawing the layers should be canceled.

public bool Cancel { get; set; }

Property Value

bool
true to stop the draw operation; otherwise, false.

WorldExtent

Gets or sets the world extent that defines the geographic area being drawn.

public RectangleShape WorldExtent { get; set; }

Property Value

RectangleShape

NativeImage

Gets or sets the native image handle or drawing surface associated with the current render pass.

public object NativeImage { get; set; }

Property Value

object

Layers

Gets or sets the layers scheduled to draw for the current map view.

public IEnumerable<Layer> Layers { get; set; }

Property Value

IEnumerable<Layer>

Constructors

LayersDrawingEventArgs()

Initializes a new instance of the LayersDrawingEventArgs class.

public LayersDrawingEventArgs()

Remarks:

When this constructor is used, the LayersDrawingEventArgs.Layers, LayersDrawingEventArgs.WorldExtent, and LayersDrawingEventArgs.NativeImage properties must be populated manually before the event is raised.

LayersDrawingEventArgs(IEnumerable<Layer>, RectangleShape, object)

Initializes a new instance of the LayersDrawingEventArgs class with the specified drawing information.

public LayersDrawingEventArgs(IEnumerable<Layer> layers, RectangleShape worldExtent, object nativeImage)

Parameters

layers IEnumerable<Layer>
The collection of layers that are about to be drawn.

worldExtent RectangleShape
The world extent that describes the current view.

nativeImage object
The native image handle or surface that the layers will draw on.