PopupOverlay¶
Namespace: ThinkGeo.Core
This class represents an overlay to place popups on the map.
public class PopupOverlay : Overlay, System.IDisposable
Inheritance Object → Overlay → PopupOverlay
Implements IDisposable
Properties¶
Popups¶
This property gets a collection of popup that are added into this overlay.
public GeoCollection<Popup> Popups { get; }
Property Value¶
GeoCollection<Popup>
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¶
PopupOverlay()¶
This is constructor of PopupOverlay class.
public PopupOverlay()
PopupOverlay(IEnumerable<Popup>)¶
This is constructor of PopupOverlay class.
public PopupOverlay(IEnumerable<Popup> popups)
Parameters¶
popups
IEnumerable<Popup>
This parameter indicates a collection of popup that are added into this overlay.
Methods¶
GetBoundingBoxCore()¶
This method returns a bounding box to hold all popups.
protected RectangleShape GetBoundingBoxCore()
Returns¶
RectangleShape
A RectangleShape value that to hold all popups.
DrawAsyncCore(RectangleShape, OverlayRefreshType, CancellationToken)¶
This method draws the popups by the specified targetExtent.
protected Task DrawAsyncCore(RectangleShape targetExtent, OverlayRefreshType overlayRefreshType, CancellationToken cancellationToken)
Parameters¶
targetExtent
RectangleShape
This parameter indicates an extent to draw the popups.
overlayRefreshType
OverlayRefreshType
This parameter indicates whether this overlay needs to be refresh or not.
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;