TrackInteractiveOverlay¶
Namespace: ThinkGeo.UI.Maui
public class TrackInteractiveOverlay : InteractiveOverlay, System.ComponentModel.INotifyPropertyChanged, Microsoft.Maui.Controls.Internals.IDynamicResourceHandler, Microsoft.Maui.Controls.IElementDefinition, Microsoft.Maui.Controls.Internals.INameScope, Microsoft.Maui.Controls.IElementController, Microsoft.Maui.IVisualTreeElement, Microsoft.Maui.IElement, Microsoft.Maui.Controls.IEffectControlProvider, Microsoft.Maui.IToolTipElement, Microsoft.Maui.IContextFlyoutElement, Microsoft.Maui.Controls.IControlsElement, Microsoft.Maui.Controls.StyleSheets.IStyleSelectable, Microsoft.Maui.Controls.Internals.INavigationProxy, Microsoft.Maui.Controls.IAnimatable, Microsoft.Maui.Controls.IVisualElementController, Microsoft.Maui.Controls.IResourcesProvider, Microsoft.Maui.Controls.IStyleElement, Microsoft.Maui.Controls.IFlowDirectionController, Microsoft.Maui.Controls.IPropertyPropagationController, Microsoft.Maui.Controls.IVisualController, Microsoft.Maui.Controls.IWindowController, Microsoft.Maui.IView, Microsoft.Maui.ITransform, Microsoft.Maui.Controls.IControlsVisualElement, Microsoft.Maui.Controls.StyleSheets.IStylable, Microsoft.Maui.Controls.IViewController, Microsoft.Maui.Controls.Internals.IGestureController, Microsoft.Maui.Controls.IGestureRecognizers, Microsoft.Maui.IPropertyMapperView, Microsoft.Maui.HotReload.IHotReloadableView, Microsoft.Maui.IReplaceableView, Microsoft.Maui.Controls.IControlsView, Microsoft.Maui.ILayout, Microsoft.Maui.IContainer, System.Collections.Generic.IList`1[[Microsoft.Maui.IView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.ICollection`1[[Microsoft.Maui.IView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.Generic.IEnumerable`1[[Microsoft.Maui.IView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Collections.IEnumerable, Microsoft.Maui.ISafeAreaView, Microsoft.Maui.IPadding, Microsoft.Maui.ICrossPlatformLayout, Microsoft.Maui.Controls.IBindableLayout, Microsoft.Maui.Controls.IPaddingElement, Microsoft.Maui.Controls.IInputTransparentContainerElement, Microsoft.Maui.IAbsoluteLayout, System.IDisposable
Inheritance Object → BindableObject → Element → NavigableElement → VisualElement → View → Layout → AbsoluteLayout → Overlay → GraphicsViewOverlay → InteractiveOverlay → TrackInteractiveOverlay
Implements INotifyPropertyChanged, IDynamicResourceHandler, IElementDefinition, INameScope, IElementController, IVisualTreeElement, IElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IControlsElement, IStyleSelectable, INavigationProxy, IAnimatable, IVisualElementController, IResourcesProvider, IStyleElement, IFlowDirectionController, IPropertyPropagationController, IVisualController, IWindowController, IView, ITransform, IControlsVisualElement, IStylable, IViewController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, IControlsView, ILayout, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IBindableLayout, IPaddingElement, IInputTransparentContainerElement, IAbsoluteLayout, 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¶
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¶
VertexCountInEllipseQuarter¶
The vertex count in a quarter of an ellipse/circle
public int VertexCountInEllipseQuarter { get; set; }
Property Value¶
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.
Name¶
Gets or sets the name of this overlay.
public string Name { get; set; }
Property Value¶
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.
Children¶
public IList<IView> Children { get; }
Property Value¶
Count¶
public int Count { get; }
Property Value¶
IsReadOnly¶
public bool IsReadOnly { get; }
Property Value¶
Item¶
public IView Item { get; set; }
Property Value¶
IView
IsClippedToBounds¶
public bool IsClippedToBounds { get; set; }
Property Value¶
Padding¶
public Thickness Padding { get; set; }
Property Value¶
Thickness
IgnoreSafeArea¶
public bool IgnoreSafeArea { get; set; }
Property Value¶
CascadeInputTransparent¶
public bool CascadeInputTransparent { get; set; }
Property Value¶
GestureRecognizers¶
public IList<IGestureRecognizer> GestureRecognizers { get; }
Property Value¶
HorizontalOptions¶
public LayoutOptions HorizontalOptions { get; set; }
Property Value¶
LayoutOptions
Margin¶
public Thickness Margin { get; set; }
Property Value¶
Thickness
VerticalOptions¶
public LayoutOptions VerticalOptions { get; set; }
Property Value¶
LayoutOptions
Visual¶
public IVisual Visual { get; set; }
Property Value¶
IVisual
FlowDirection¶
public FlowDirection FlowDirection { get; set; }
Property Value¶
FlowDirection
Window¶
public Window Window { get; }
Property Value¶
Window
AnchorX¶
public double AnchorX { get; set; }
Property Value¶
AnchorY¶
public double AnchorY { get; set; }
Property Value¶
BackgroundColor¶
public Color BackgroundColor { get; set; }
Property Value¶
Color
Background¶
public Brush Background { get; set; }
Property Value¶
Brush
Behaviors¶
public IList<Behavior> Behaviors { get; }
Property Value¶
Bounds¶
public Rect Bounds { get; }
Property Value¶
Rect
Height¶
public double Height { get; }
Property Value¶
HeightRequest¶
public double HeightRequest { get; set; }
Property Value¶
InputTransparent¶
public bool InputTransparent { get; set; }
Property Value¶
IsEnabled¶
public bool IsEnabled { get; set; }
Property Value¶
IsFocused¶
public bool IsFocused { get; }
Property Value¶
IsVisible¶
public bool IsVisible { get; set; }
Property Value¶
MinimumHeightRequest¶
public double MinimumHeightRequest { get; set; }
Property Value¶
MinimumWidthRequest¶
public double MinimumWidthRequest { get; set; }
Property Value¶
MaximumHeightRequest¶
public double MaximumHeightRequest { get; set; }
Property Value¶
MaximumWidthRequest¶
public double MaximumWidthRequest { get; set; }
Property Value¶
Opacity¶
public double Opacity { get; set; }
Property Value¶
Rotation¶
public double Rotation { get; set; }
Property Value¶
RotationX¶
public double RotationX { get; set; }
Property Value¶
RotationY¶
public double RotationY { get; set; }
Property Value¶
Scale¶
public double Scale { get; set; }
Property Value¶
ScaleX¶
public double ScaleX { get; set; }
Property Value¶
ScaleY¶
public double ScaleY { get; set; }
Property Value¶
TranslationX¶
public double TranslationX { get; set; }
Property Value¶
TranslationY¶
public double TranslationY { get; set; }
Property Value¶
Triggers¶
public IList<TriggerBase> Triggers { get; }
Property Value¶
Width¶
public double Width { get; }
Property Value¶
WidthRequest¶
public double WidthRequest { get; set; }
Property Value¶
X¶
public double X { get; }
Property Value¶
Y¶
public double Y { get; }
Property Value¶
Clip¶
public Geometry Clip { get; set; }
Property Value¶
Geometry
Batched¶
public bool Batched { get; }
Property Value¶
DisableLayout¶
public bool DisableLayout { get; set; }
Property Value¶
IsInPlatformLayout¶
public bool IsInPlatformLayout { get; set; }
Property Value¶
IsPlatformStateConsistent¶
public bool IsPlatformStateConsistent { get; set; }
Property Value¶
IsPlatformEnabled¶
public bool IsPlatformEnabled { get; set; }
Property Value¶
Resources¶
public ResourceDictionary Resources { get; set; }
Property Value¶
ResourceDictionary
Frame¶
public Rect Frame { get; set; }
Property Value¶
Rect
Handler¶
public IViewHandler Handler { get; set; }
Property Value¶
IViewHandler
Shadow¶
public Shadow Shadow { get; set; }
Property Value¶
Shadow
ZIndex¶
public int ZIndex { get; set; }
Property Value¶
DesiredSize¶
public Size DesiredSize { get; protected set; }
Property Value¶
Size
IsLoaded¶
public bool IsLoaded { get; }
Property Value¶
Navigation¶
public INavigation Navigation { get; internal set; }
Property Value¶
INavigation
Style¶
public Style Style { get; set; }
Property Value¶
Style
StyleClass¶
public IList<string> StyleClass { get; set; }
Property Value¶
class¶
public IList<string> class { get; set; }
Property Value¶
NavigationProxy¶
public NavigationProxy NavigationProxy { get; }
Property Value¶
NavigationProxy
AutomationId¶
public string AutomationId { get; set; }
Property Value¶
ClassId¶
public string ClassId { get; set; }
Property Value¶
Effects¶
public IList<Effect> Effects { get; }
Property Value¶
Id¶
public Guid Id { get; }
Property Value¶
StyleId¶
public string StyleId { get; set; }
Property Value¶
LogicalChildren¶
public ReadOnlyCollection<Element> LogicalChildren { get; }
Property Value¶
RealParent¶
public Element RealParent { get; }
Property Value¶
Element
Parent¶
public Element Parent { get; set; }
Property Value¶
Element
EffectControlProvider¶
public IEffectControlProvider EffectControlProvider { get; set; }
Property Value¶
IEffectControlProvider
Handler¶
public IElementHandler Handler { get; set; }
Property Value¶
IElementHandler
Dispatcher¶
public IDispatcher Dispatcher { get; }
Property Value¶
IDispatcher
BindingContext¶
public object BindingContext { get; set; }
Property Value¶
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(TouchDownMapViewEventArgs, IMapView)¶
This overrides the MouseDown logic in its base class InteractiveOverlay.
protected EventBubblingMode TouchDownCore(TouchDownMapViewEventArgs e, IMapView mapView)
Parameters¶
e
TouchDownMapViewEventArgs
The event args of MapView.TouchDown event.
mapView
IMapView
The mapView the overlay is added to
Returns¶
EventBubblingMode
Interaction results of this method.
Exceptions¶
ArgumentNullException
If you pass a null as the interactionArguments, we will throw an ArgumentNullException.
TouchMoveCore(TouchMoveMapViewEventArgs, IMapView)¶
This overrides the MouseMove logic in its base class InteractiveOverlay.
protected EventBubblingMode TouchMoveCore(TouchMoveMapViewEventArgs e, IMapView mapView)
Parameters¶
e
TouchMoveMapViewEventArgs
The event args of MapView.TouchMove event.
mapView
IMapView
The mapView the overlay is added to
Returns¶
EventBubblingMode
Interaction results of this method.
Exceptions¶
ArgumentNullException
If you pass a null as the interactionArguments, we will throw an ArgumentNullException.
TouchUpCore(TouchUpMapViewEventArgs, IMapView)¶
This overrides the MouseUp logic in its base class InteractiveOverlay.
protected EventBubblingMode TouchUpCore(TouchUpMapViewEventArgs e, IMapView mapView)
Parameters¶
e
TouchUpMapViewEventArgs
The event args of MapView.TouchUp event.
mapView
IMapView
The mapView the overlay is added to
Returns¶
EventBubblingMode
Interaction results of this method.
Exceptions¶
ArgumentNullException
If you pass a null as the interactionArguments, we will throw an ArgumentNullException.
LongPressCore(LongPressMapViewEventArgs, IMapView)¶
This overrides the MouseDoubleClick logic in its base class InteractiveOverlay.
protected EventBubblingMode LongPressCore(LongPressMapViewEventArgs e, IMapView mapView)
Parameters¶
e
LongPressMapViewEventArgs
The event args of MapView.LongPress event.
mapView
IMapView
The mapView the overlay is added to
Returns¶
EventBubblingMode
Interaction results of this method.
Exceptions¶
ArgumentNullException
If you pass a null as the interactionArguments, we will throw an ArgumentNullException.
DoubleTapCore(DoubleTapMapViewEventArgs, IMapView)¶
protected EventBubblingMode DoubleTapCore(DoubleTapMapViewEventArgs e, IMapView mapView)
Parameters¶
mapView
IMapView
Returns¶
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 override 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.
OnTouchMoving(TouchMovingTrackInteractiveOverlayEventArgs)¶
This event will be fired when mouse moved a vertex to the Tracking shape.
protected void OnTouchMoving(TouchMovingTrackInteractiveOverlayEventArgs e)
Parameters¶
e
TouchMovingTrackInteractiveOverlayEventArgs
The MouseMovedTrackInteractiveOverlayEventArgs passed for the event raised.
DrawAsyncCore(OverlayRefreshType, CancellationToken)¶
This method draws the overlay with the provided extent in world coordinate.
protected Task DrawAsyncCore(OverlayRefreshType refreshType, CancellationToken cancellationToken)
Parameters¶
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 redrawn,
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.
cancellationToken
CancellationToken
The token to monitor the cancellation requests.
Returns¶
TransformCore(RectangleShape, IMapView)¶
protected void TransformCore(RectangleShape extent, IMapView mapView)
Parameters¶
extent
RectangleShape
mapView
IMapView
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;
TouchMoving¶
This event will be fired when touch moved on the vertex of tracking shape.
public event EventHandler<TouchMovingTrackInteractiveOverlayEventArgs> TouchMoving;
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;
ChildrenReordered¶
public event EventHandler ChildrenReordered;
Focused¶
public event EventHandler<FocusEventArgs> Focused;
MeasureInvalidated¶
public event EventHandler MeasureInvalidated;
SizeChanged¶
public event EventHandler SizeChanged;
Unfocused¶
public event EventHandler<FocusEventArgs> Unfocused;
BatchCommitted¶
public event EventHandler<EventArg<VisualElement>> BatchCommitted;
FocusChangeRequested¶
public event EventHandler<FocusRequestArgs> FocusChangeRequested;
Loaded¶
public event EventHandler Loaded;
Unloaded¶
public event EventHandler Unloaded;
ChildAdded¶
public event EventHandler<ElementEventArgs> ChildAdded;
ChildRemoved¶
public event EventHandler<ElementEventArgs> ChildRemoved;
DescendantAdded¶
public event EventHandler<ElementEventArgs> DescendantAdded;
DescendantRemoved¶
public event EventHandler<ElementEventArgs> DescendantRemoved;
ParentChanging¶
public event EventHandler<ParentChangingEventArgs> ParentChanging;
ParentChanged¶
public event EventHandler ParentChanged;
HandlerChanging¶
public event EventHandler<HandlerChangingEventArgs> HandlerChanging;
HandlerChanged¶
public event EventHandler HandlerChanged;
PropertyChanged¶
public event PropertyChangedEventHandler PropertyChanged;
PropertyChanging¶
public event PropertyChangingEventHandler PropertyChanging;
BindingContextChanged¶
public event EventHandler BindingContextChanged;