SimpleMarkerOverlay¶
Namespace: ThinkGeo.Core
Represents a MarkerOverlay object to which you can add markers directly.
public class SimpleMarkerOverlay : MarkerOverlay, System.IDisposable
Inheritance Object → Overlay → MarkerOverlay → SimpleMarkerOverlay
Implements IDisposable
Remarks:
The SimpleMarkerOverlay class has a Markers collection to which you can add markers directly. All of these markers will be placed on the map loading. You can also specify whether the markers can be dragged by setting the DragMode property.
Properties¶
DragMode¶
Gets a value that specifies how the markers can be dragged.
public MarkerDragMode DragMode { get; set; }
Property Value¶
MarkerDragMode
An enum value that specifies how the markers can be dragged.
Markers¶
A collection that holds all the marker objects adding in the overlay.
public GeoCollection<Marker> Markers { get; }
Property Value¶
GeoCollection<Marker>
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¶
Constructors¶
SimpleMarkerOverlay()¶
Constructor of SimpleMarkerOverlay class.
public SimpleMarkerOverlay()
SimpleMarkerOverlay(IEnumerable<Marker>)¶
Constructor of SimpleMarkerOver
public SimpleMarkerOverlay(IEnumerable<Marker> markers)
Parameters¶
markers
IEnumerable<Marker>
Methods¶
GetMarkersForDrawingCore(RectangleShape)¶
Gets all the markers that are containing in the provided world extent.
protected GeoCollection<Marker> GetMarkersForDrawingCore(RectangleShape boundingBox)
Parameters¶
boundingBox
RectangleShape
A world extent of current viewport.
Returns¶
GeoCollection<Marker>
A collection of marker objects that are in the provided world extent.
OnMarkerDragging(MarkerDraggingSimpleMarkerOverlayEventArgs)¶
This method raises before the marker is dragging.
protected void OnMarkerDragging(MarkerDraggingSimpleMarkerOverlayEventArgs args)
Parameters¶
args
MarkerDraggingSimpleMarkerOverlayEventArgs
This parameter is the event args for the MarkerDragging event.
OnMarkerDragged(MarkerDraggedSimpleMarkerOverlayEventArgs)¶
This method raises after the marker is dragged.
protected void OnMarkerDragged(MarkerDraggedSimpleMarkerOverlayEventArgs args)
Parameters¶
args
MarkerDraggedSimpleMarkerOverlayEventArgs
This parameter is the event args for the MarkerDragged event.
GetBoundingBoxCore()¶
This method gets a bounding box that maintains all the markers which are added in this overlay.
protected RectangleShape GetBoundingBoxCore()
Returns¶
RectangleShape
Returns a RectangleShape that maintains all the markers which are added in this overlay.
SaveStateCore()¶
This method saves simple marker overlay state to a byte array.
protected Byte[] SaveStateCore()
Returns¶
Byte[]
A byte array indicates current overlay state.
LoadStateCore(Byte[])¶
This method restore the simple marker overlay state back from the specified state.
protected void LoadStateCore(Byte[] state)
Parameters¶
state
Byte[]
This parameter indicates the state for restore the overlay.
Events¶
MarkerDragging¶
This is an event raises before the marker is dragging.
public event EventHandler<MarkerDraggingSimpleMarkerOverlayEventArgs> MarkerDragging;
MarkerDragged¶
This is an event raises after the marker is dragged.
public event EventHandler<MarkerDraggedSimpleMarkerOverlayEventArgs> MarkerDragged;
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;