Skip to content

FeatureSourceMarkerOverlay

Namespace: ThinkGeo.Core

Represents a MarkerOverlay that dynamically creates markers from the feature source specified.

public class FeatureSourceMarkerOverlay : MarkerOverlay, System.IDisposable

Inheritance ObjectOverlayMarkerOverlayFeatureSourceMarkerOverlay
Implements IDisposable

Remarks:

The FeatureSourceMarkerOverlay generates markers from the features retrieved from its FeatureSource. Thus, you need to set the FeatureSource property before the marker overlay can create the markers. The ZoomLevelSet property is an entrance for you to define the marker styles on zoomlevels.

Properties

FeatureSource

Gets or sets a feature source object that provides the features from which the markers are created.

public FeatureSource FeatureSource { get; set; }

Property Value

FeatureSource

        A feature source object that provides the features from which the markers are
        created.

ZoomLevelSet

Gets the ZoomLevelSet object that controls the markers' generation.

public MarkerZoomLevelSet ZoomLevelSet { get; }

Property Value

MarkerZoomLevelSet
A ZoomLevelSet object that controls the markers' generation.

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

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

IsEmpty

This property gets if this overlay is empty or not.

public bool IsEmpty { get; }

Property Value

Boolean

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

TimeSpan

Constructors

FeatureSourceMarkerOverlay()

Initialize an instance of the FeatureSourceMarkerOverlay class.

public FeatureSourceMarkerOverlay()

FeatureSourceMarkerOverlay(FeatureSource)

Initialize an instance of the FeatureSourceMarkerOverlay class.

public FeatureSourceMarkerOverlay(FeatureSource featureSource)

Parameters

featureSource FeatureSource

        The feature source object that provides the features from which the markers are
        created.

Methods

DrawCore(RectangleShape, OverlayRefreshType)

This method draws markers by the passed parameters.

protected void DrawCore(RectangleShape targetExtent, OverlayRefreshType overlayRefreshType)

Parameters

targetExtent RectangleShape
A world extent that to query features that for creating markers.

overlayRefreshType OverlayRefreshType
This parameter indicates whether needs to redraw this overlay.

Remarks:

When overriding this method; consider dispose the old image source in the existing markers; or else some image source cannot be recycled.

GetMarkersForDrawingCore(RectangleShape)

Returns a collection of markers based on the extent and zoomlevel that you passed in.

protected GeoCollection<Marker> GetMarkersForDrawingCore(RectangleShape boundingBox)

Parameters

boundingBox RectangleShape
The extent that includes the markers you want to serialize.

Returns

GeoCollection<Marker>
A collection of marker objects that will be placed on the map.

GetBoundingBoxCore()

This method gets a bounding box that maintains all the features which are added in this overlay.

protected RectangleShape GetBoundingBoxCore()

Returns

RectangleShape
Returns a RectangleShape that maintains all the features which are added in this overlay.

OnMarkerMouseDown(MouseButtonEventArgs)

protected void OnMarkerMouseDown(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

OnMarkerMouseUp(MouseButtonEventArgs)

protected void OnMarkerMouseUp(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

OnMarkerMouseClick(MouseButtonEventArgs)

protected void OnMarkerMouseClick(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

OnMarkerMouseMove(MouseEventArgs)

protected void OnMarkerMouseMove(MouseEventArgs e)

Parameters

e MouseEventArgs

Events

MarkerMouseDown

public event MouseButtonEventHandler MarkerMouseDown;

MarkerMouseUp

public event MouseButtonEventHandler MarkerMouseUp;

MarkerMouseClick

public event MouseButtonEventHandler MarkerMouseClick;

MarkerMouseMove

public event MouseEventHandler MarkerMouseMove;

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;