Skip to content

TrackInteractiveOverlay

Namespace: ThinkGeo.UI.Android

This class inherits from InteractiveOverlay abstract class. This specified overlay describe the TrackShape interactive process with MapControl using Mouse or Keyboard.

public class TrackInteractiveOverlay : InteractiveOverlay, System.IDisposable

Inheritance ObjectOverlayBaseOverlayInteractiveOverlayTrackInteractiveOverlay
Implements IDisposable

Properties

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

IsInTracking

This property gets or sets to sign that if there is any shape being tracking.

public bool IsInTracking { get; set; }

Property Value

Boolean

VertexCountInEllipseQuarter

The vertex count in a quarter of an ellipse/circle

public int VertexCountInEllipseQuarter { get; set; }

Property Value

Int32

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 at client. 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 at the client side.

InteractiveView

Gets or sets Overlay's the interactiveView.

public TileView InteractiveView { get; set; }

Property Value

TileView

OverlayView

Gets or sets the overlay view.

public MapLayout OverlayView { get; set; }

Property Value

MapLayout
The overlay view.

IsVisible

public bool IsVisible { get; set; }

Property Value

Boolean

Name

Gets or sets the name of this overaly.

public string Name { get; set; }

Property Value

String

DrawingExceptionMode

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

public DrawingExceptionMode DrawingExceptionMode { get; set; }

Property Value

DrawingExceptionMode
The drawing exception mode.

MapArguments

Gets or sets the map arguments.

public MapArguments MapArguments { get; set; }

Property Value

MapArguments
The map arguments.

Attribution

Gets or sets the attribution.

public string Attribution { get; set; }

Property Value

String
The attribution.

DrawingQuality

Gets or sets the drawingQuality for this overlay.

public DrawingQuality DrawingQuality { get; set; }

Property Value

DrawingQuality

Opacity

Gets or sets the opacity for this overlay.

public double Opacity { get; set; }

Property Value

Double

Constructors

TrackInteractiveOverlay()

Default constructor of the class.

If you use this constructor, please set the properties correctly or it will use their default values.

public TrackInteractiveOverlay()

Methods

TouchDownCore(InteractionArguments)

This overrides the MouseDown logic in its base class InteractiveOverlay.

protected InteractiveResult TouchDownCore(InteractionArguments interactionArguments)

Parameters

interactionArguments InteractionArguments
This parameter is the interaction arguments for the method.

Returns

InteractiveResult
Interaction results of this method.

Exceptions

ArgumentNullException
If you pass a null as the interactionArguments, we will throw an ArgumentNullException.

TouchMoveCore(InteractionArguments)

This overrides the MouseMove logic in its base class InteractiveOverlay.

protected InteractiveResult TouchMoveCore(InteractionArguments interactionArguments)

Parameters

interactionArguments InteractionArguments
This parameter is the interaction arguments for the method.

Returns

InteractiveResult
Interaction results of this method.

Exceptions

ArgumentNullException
If you pass a null as the interactionArguments, we will throw an ArgumentNullException.

TouchUpCore(InteractionArguments)

This overrides the MouseUp logic in its base class InteractiveOverlay.

protected InteractiveResult TouchUpCore(InteractionArguments interactionArguments)

Parameters

interactionArguments InteractionArguments
This parameter is the interaction arguments for the method.

Returns

InteractiveResult
Interaction results of this method.

Exceptions

ArgumentNullException
If you pass a null as the interactionArguments, we will throw an ArgumentNullException.

LongPressCore(InteractionArguments)

This overrides the MouseDoubleClick logic in its base class InteractiveOverlay.

protected InteractiveResult LongPressCore(InteractionArguments interactionArguments)

Parameters

interactionArguments InteractionArguments
This parameter is the interaction arguments for the method.

Returns

InteractiveResult
Interaction results of this method.

Exceptions

ArgumentNullException
If you pass a null as the interactionArguments, we will throw an ArgumentNullException.

GetTrackingShape()

This method gets the current Tracking shape.

public BaseShape GetTrackingShape()

Returns

BaseShape
Returns a shape represents the current status of tracking shape.

Remarks:

This method is the concrete wrapper for the abstract method GetTrackingShapeCore. This method draws the representation of the overlay based on the extent you provided.

GetTrackingShapeCore()

This is the Core method of GetTrackingShape.You could overrides this method to have your own logic. This method gets the current Tracking shape.

protected BaseShape GetTrackingShapeCore()

Returns

BaseShape
Returns a shape represents the current status of tracking shape.

OnTrackEnded(TrackEndedTrackInteractiveOverlayEventArgs)

This event will be fired after the end of Tracking a shape.

protected void OnTrackEnded(TrackEndedTrackInteractiveOverlayEventArgs e)

Parameters

e TrackEndedTrackInteractiveOverlayEventArgs
The TrackEndedTrackInteractiveOverlayEventArgs passed for the event raised.

OnTrackEnding(TrackEndingTrackInteractiveOverlayEventArgs)

This event will be fired before the end of Tracking a shape.

protected void OnTrackEnding(TrackEndingTrackInteractiveOverlayEventArgs e)

Parameters

e TrackEndingTrackInteractiveOverlayEventArgs
The TrackEndingTrackInteractiveOverlayEventArgs passed for the event raised.

OnTrackStarting(TrackStartingTrackInteractiveOverlayEventArgs)

This event will be fired before the start of Tracking a shape.

protected void OnTrackStarting(TrackStartingTrackInteractiveOverlayEventArgs e)

Parameters

e TrackStartingTrackInteractiveOverlayEventArgs
The TrackStartingTrackInteractiveOverlayEventArgs passed for the event raised.

OnTrackStarted(TrackStartedTrackInteractiveOverlayEventArgs)

This event will be fired after the start of Tracking a shape.

protected void OnTrackStarted(TrackStartedTrackInteractiveOverlayEventArgs e)

Parameters

e TrackStartedTrackInteractiveOverlayEventArgs
The TrackStartedTrackInteractiveOverlayEventArgs passed for the event raised.

OnVertexAdding(VertexAddingTrackInteractiveOverlayEventArgs)

This event will be fired before adding a vertex to the Tracking shape.

protected void OnVertexAdding(VertexAddingTrackInteractiveOverlayEventArgs e)

Parameters

e VertexAddingTrackInteractiveOverlayEventArgs
The VertexAddingTrackInteractiveOverlayEventArgs passed for the event raised.

OnVertexAdded(VertexAddedTrackInteractiveOverlayEventArgs)

This event will be fired after adding a vertex to the Tracking shape.

protected void OnVertexAdded(VertexAddedTrackInteractiveOverlayEventArgs e)

Parameters

e VertexAddedTrackInteractiveOverlayEventArgs
The VertexAddedTrackInteractiveOverlayEventArgs passed for the event raised.

OnTouchMoved(TouchMovedTrackInteractiveOverlayEventArgs)

This event will be fired when mouse moved a vertex to the Tracking shape.

protected void OnTouchMoved(TouchMovedTrackInteractiveOverlayEventArgs e)

Parameters

e TouchMovedTrackInteractiveOverlayEventArgs
The MouseMovedTrackInteractiveOverlayEventArgs passed for the event raised.

DrawAsyncCore(MapArguments, OverlayRefreshType)

This method draws the overlay with the provided extent in world coordinate.

protected Task DrawAsyncCore(MapArguments mapArguments, OverlayRefreshType refreshType)

Parameters

mapArguments MapArguments
This parameter maintains current map information for calculating mechanism.

refreshType OverlayRefreshType

        This parameter indicates whether the elements of this overlay needs to be refreshed.
        For example, TileOverlay is formed by tiles.
        When panning the map around, the existing tile doesn't need to be redraw,
        the only thing we need to do is modifying the position of these tiles.
        On another hand, when click to change the style of the overlay,
        we need to redraw the tile images to change the appearance. So we need refresh mode.

Returns

Task

DrawCore(MapArguments, OverlayRefreshType)

This method draws the overlay with the provided extent in world coordinate.

protected void DrawCore(MapArguments mapArguments, OverlayRefreshType refreshType)

Parameters

mapArguments MapArguments
This parameter maintains current map information for calculating mechanism.

refreshType OverlayRefreshType

        This parameter indicates whether the elements of this overlay needs to be refreshed.
        For example, TileOverlay is formed by tiles.
        When panning the map around, the existing tile doesn't need to be redraw,
        the only thing we need to do is modifying the position of these tiles.
        On another hand, when click to change the style of the overlay,
        we need to redraw the tile images to change the appearance. So we need refresh mode.

EndTracking()

This method ends the tracking shape by initialize some variables.

protected void EndTracking()

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;

TouchMoved

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

public event EventHandler<TouchMovedTrackInteractiveOverlayEventArgs> TouchMoved;

DrawingException

Occurs before exception is drawing on map.

public event EventHandler<DrawingExceptionOverlayEventArgs> DrawingException;

DrawnException

Occurs after exception is drawn on map.

public event EventHandler<DrawnExceptionOverlayEventArgs> DrawnException;

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;