Skip to content

MeasureInteractiveOverlay

Namespace: ThinkGeo.Core

public class MeasureInteractiveOverlay : TrackInteractiveOverlay, System.IDisposable

Inheritance ObjectOverlayInteractiveOverlayTrackInteractiveOverlayMeasureInteractiveOverlay
Implements IDisposable

Properties

UnitOfMeasure

The unit of measure to display the distance in

public DistanceUnit UnitOfMeasure { get; set; }

Property Value

DistanceUnit

VertexPointStyle

The PointStyle for the start and end points

public PointStyle VertexPointStyle { get; set; }

Property Value

PointStyle

RulerLineStyle

The LineStyle for the ruler line

public LineStyle RulerLineStyle { get; set; }

Property Value

LineStyle

RulerTextStyle

The TextStyle for the ruler's label. TextColumnName must be "label"

public TextStyle RulerTextStyle { get; set; }

Property Value

TextStyle

IsEmpty

This property override the logic in its base class by watching the feature count in trackShapeLayer.

If it is empty ,we can skip drawing it for better performance.

public bool IsEmpty { get; }

Property Value

Boolean

TrackShapeLayer

This property gets the TrackShape layers which holds the track shapes.

public InMemoryFeatureLayer TrackShapeLayer { get; }

Property Value

InMemoryFeatureLayer

TrackShapesInProcessLayer

public InMemoryFeatureLayer TrackShapesInProcessLayer { get; }

Property Value

InMemoryFeatureLayer

VertexCountInQuarter

public int VertexCountInQuarter { get; set; }

Property Value

Int32

PolygonTrackMode

public PolygonTrackMode PolygonTrackMode { get; set; }

Property Value

PolygonTrackMode

TrackMode

Gets a mode of TrackOverlay.

public TrackMode TrackMode { get; set; }

Property Value

TrackMode
A mode of TrackOverlay.

Remarks:

The default mode is TrackMode.None which means you cannot draw or edit features. By setting the mode to TrackMode.Point, TrackMode.Line, TrackMode.Polygon etc., you could add point, line or polygon to the FeatureOverlay. Setting the mode to TrackMode.Edit, you could edit the shapes.

DrawingMarginPercentage

This property gets and sets the extra drawing margin as a percentage around the map that draw to ensure that labeling is correct.

public double DrawingMarginPercentage { get; set; }

Property Value

Double

        This property gets the extra drawing margin as a percentage around the map that
        draws to ensure that labeling is correct.

Remarks:

This extra margin that we draw exists so that labels match up if they are partially cut off.

RenderMode

public RenderMode RenderMode { get; set; }

Property Value

RenderMode

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

RefreshTypeOnResize

public OverlayRefreshType RefreshTypeOnResize { get; set; }

Property Value

OverlayRefreshType

Attribution

public string Attribution { get; set; }

Property Value

String

AutoRefreshInterval

public TimeSpan AutoRefreshInterval { get; set; }

Property Value

TimeSpan

Constructors

MeasureInteractiveOverlay()

The MeasureInteractiveOverlay is a simple measurement tool that measures the distance between two points. To enable, set IsVisible=true, then click and drag mouse from start to end to display the distance and bearing. Press ESC to clear the measurement.

public MeasureInteractiveOverlay()

MeasureInteractiveOverlay(DistanceUnit)

The MeasureInteractiveOverlay is a simple measurement tool that measures the distance between two points. To enable, set IsVisible=true, then click and drag mouse from start to end to display the distance and bearing. Press ESC to clear the measurement.

public MeasureInteractiveOverlay(DistanceUnit distanceUnit)

Parameters

distanceUnit DistanceUnit
The unit of measure to display the distance in

Methods

MouseDownCore(InteractionArguments)

protected InteractiveResult MouseDownCore(InteractionArguments interactionArguments)

Parameters

interactionArguments InteractionArguments

Returns

InteractiveResult

MouseMoveCore(InteractionArguments)

protected InteractiveResult MouseMoveCore(InteractionArguments interactionArguments)

Parameters

interactionArguments InteractionArguments

Returns

InteractiveResult

MouseUpCore(InteractionArguments)

protected InteractiveResult MouseUpCore(InteractionArguments interactionArguments)

Parameters

interactionArguments InteractionArguments

Returns

InteractiveResult

KeyDownCore(KeyEventInteractionArguments)

protected InteractiveResult KeyDownCore(KeyEventInteractionArguments interactionArguments)

Parameters

interactionArguments KeyEventInteractionArguments

Returns

InteractiveResult

DrawCore(RectangleShape, OverlayRefreshType)

protected void DrawCore(RectangleShape targetExtent, OverlayRefreshType overlayRefreshType)

Parameters

targetExtent RectangleShape

overlayRefreshType OverlayRefreshType

DrawAsyncCore(RectangleShape, OverlayRefreshType, CancellationToken)

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

Parameters

targetExtent RectangleShape

overlayRefreshType OverlayRefreshType

cancellationToken CancellationToken

Returns

Task

Events

TrackEnded

This event will be fired after the end of tracking shape.

public event EventHandler<TrackEndedTrackInteractiveOverlayEventArgs> TrackEnded;

TrackEnding

This event will be fired before the end of tracking shape.

public event EventHandler<TrackEndingTrackInteractiveOverlayEventArgs> TrackEnding;

TrackStarted

This event will be fired after the start of tracking shape.

public event EventHandler<TrackStartedTrackInteractiveOverlayEventArgs> TrackStarted;

TrackStarting

This event will be fired before the start of tracking shape.

public event EventHandler<TrackStartingTrackInteractiveOverlayEventArgs> TrackStarting;

VertexAdded

This event will be fired after a vertex added to the tracking shape.

public event EventHandler<VertexAddedTrackInteractiveOverlayEventArgs> VertexAdded;

VertexAdding

This event will be fired before a vertex added to the tracking shape.

public event EventHandler<VertexAddingTrackInteractiveOverlayEventArgs> VertexAdding;

MouseMoved

This event will be fired when mouse moved on the vertex of tracking shape.

public event EventHandler<MouseMovedTrackInteractiveOverlayEventArgs> MouseMoved;

MapMouseDown

This event will be fired when Mouse pressed Down on the Map.

public event EventHandler<MapMouseDownInteractiveOverlayEventArgs> MapMouseDown;

MapMouseMove

This event will be fired when Mouse moved on the Map.

public event EventHandler<MapMouseMoveInteractiveOverlayEventArgs> MapMouseMove;

MapMouseUp

This event will be fired when Mouse released up on the Map.

public event EventHandler<MapMouseUpInteractiveOverlayEventArgs> MapMouseUp;

MapMouseClick

This event will be fired when Mouse clicked(mouse up and mouse down in the same postion) on the Map.

public event EventHandler<MapMouseClickInteractiveOverlayEventArgs> MapMouseClick;

MapMouseDoubleClick

This event will be fired when Mouse double clicked on the Map.

public event EventHandler<MapMouseDoubleClickInteractiveOverlayEventArgs> MapMouseDoubleClick;

MapMouseWheel

This event will be fired when Mouse wheel on the Map.

public event EventHandler<MapMouseWheelInteractiveOverlayEventArgs> MapMouseWheel;

MapMouseLeave

Occurs when mouse leave the map canvas.

public event EventHandler<MapMouseLeaveInteractiveOverlayEventArgs> MapMouseLeave;

MapMouseEnter

Occurs when mouse enter the map canvas.

public event EventHandler<MapMouseEnterInteractiveOverlayEventArgs> MapMouseEnter;

MapKeyDown

Occurs when key down on the map canvas.

public event EventHandler<MapKeyDownInteractiveOverlayEventArgs> MapKeyDown;

MapKeyUp

Occurs when key up on the map canvas.

public event EventHandler<MapKeyUpInteractiveOverlayEventArgs> MapKeyUp;

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;