MarkerOverlay¶
Namespace: ThinkGeo.Core
This class represents an overlay which maintaining markers.
public abstract class MarkerOverlay : Overlay, System.IDisposable
Inheritance Object → Overlay → MarkerOverlay
Implements IDisposable
Properties¶
WrappingMode¶
Thie property gets or sets whether allow wrap date line.
public WrappingMode WrappingMode { get; set; }
Property Value¶
WrappingMode
WrappingExtent¶
public RectangleShape WrappingExtent { get; set; }
Property Value¶
RectangleShape
CanRefreshRegion¶
public bool CanRefreshRegion { get; protected set; }
Property Value¶
IsBase¶
public bool IsBase { get; set; }
Property Value¶
Name¶
Gets or sets the name of this overaly.
public string Name { get; set; }
Property Value¶
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¶
Attribution¶
public string Attribution { get; set; }
Property Value¶
IsEmpty¶
This property gets if this overlay is empty or not.
public bool IsEmpty { get; }
Property Value¶
Remarks:
This property enhances the performance of the overlay while drawing. If is true, we will skip drawing this overlay and continue drawing the next overlay.
AutoRefreshInterval¶
public TimeSpan AutoRefreshInterval { get; set; }
Property Value¶
Methods¶
GetMarkersForDrawing(RectangleShape)¶
This method gets a marker collection for drawing on the overlay.
public GeoCollection<Marker> GetMarkersForDrawing(RectangleShape boundingBox)
Parameters¶
boundingBox
RectangleShape
This parameter is the extent in world coordinate for requesting markers.
Returns¶
GeoCollection<Marker>
An marker collection for drawing.
Remarks:
This is a wrapper method for the abstract method GetDrawingMarkersCore.
GetMarkersForDrawingCore(RectangleShape)¶
This abstract method gets a collection of marker for drawing on the overlay.
protected abstract GeoCollection<Marker> GetMarkersForDrawingCore(RectangleShape boundingBox)
Parameters¶
boundingBox
RectangleShape
This parameter is the extent in world coordinate for creating markers.
Returns¶
GeoCollection<Marker>
A collection of markers which are used for placing on the overlay.
Remarks:
When implementing this method, consider requesting points in the provided world extent, then create marker controls from these points.
DrawAsyncCore(RectangleShape, OverlayRefreshType, CancellationToken)¶
This method creates markers in the provided world extent and places on the overlay.
protected Task DrawAsyncCore(RectangleShape targetExtent, OverlayRefreshType overlayRefreshType, CancellationToken cancellationToken)
Parameters¶
targetExtent
RectangleShape
This parameter is the extent in world coordinate for filtering markers.
overlayRefreshType
OverlayRefreshType
This parameter indicates if the elements in the overlay needs to be refreshed.
cancellationToken
CancellationToken
Returns¶
Events¶
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;