MapLayer
Groups map visual elements into a visibility, clustering, and colorization unit.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.RadMap.dll
Syntax:
public class MapLayer : IEnumerable
Inheritance: objectMapLayer
Implements:
Constructors
Initializes a new instance of the MapLayer class.
public MapLayer()
Properties
Gets or sets the cluster distance.
public long ClusterDistance { get; set; }
The cluster distance.
Gets or sets the cluster strategy.
public IMapClusterStrategy ClusterStrategy { get; set; }
The cluster strategy.
Gets or sets the colorization strategy.
public IColorizationStrategy ColorizationStrategy { get; set; }
The colorization strategy.
Gets the number of overlays stored in the layer, including overlays currently represented by clusters.
public int Count { get; }
Gets whether the layer's overlay collection is read-only; this collection allows modification.
public bool IsReadOnly { get; }
Gets a value indicating whether updates are suspended.
public bool IsUpdateSuspended { get; }
true if updates are suspended; otherwise, false.
Gets or sets whether the layer's overlays are painted.
public bool IsVisible { get; set; }
Gets the overlays contained within this layer.
public ReadOnlyCollection<MapVisualElement> Overlays { get; }
The overlays.
Gets the viewport.
public IMapViewport Viewport { get; }
The viewport.
Gets the currently visible overlays in this layer. When cluster strategy is applied the visible overlays may differ from the user added ones.
public ReadOnlyCollection<MapVisualElement> VisibleOverlays { get; }
Methods
Adds an overlay, assigns this layer to it, and updates the viewport unless updates are suspended.
Adds the specified overlays to the layer.
public void AddRange(IEnumerable<MapVisualElement> items)
The items.
Adds the specified overlays to the layer.
public void AddRange(params MapVisualElement[] items)
The items.
Suspends updates.
public void BeginUpdate()
Removes all overlays and clears their Layer references.
public void Clear()
This method does not invalidate the viewport or refresh cached clusters. When clustering is active, previously generated clusters can continue to expose removed overlays until they are regenerated.
Determines whether the layer stores the specified overlay.
public bool Contains(MapVisualElement item)
The overlay to locate.
Returns:Copies the layer's overlays into an array, starting at the specified index.
public void CopyTo(MapVisualElement[] array, int arrayIndex)
The destination array.
arrayIndexintThe zero-based destination index.
Resumes updates and performs an update.
public void EndUpdate()
Resumes updates and performs an update based on the provided parameter
Returns an enumerator over the overlays in their collection order.
public IEnumerator<MapVisualElement> GetEnumerator()
IEnumerator<MapVisualElement>
An enumerator for the layer's overlays.
Hit tests the overlays in the layer.
public MapVisualElement HitTest(PointG point)
The point.
Returns:MapVisualElement.
Hit tests the overlays in the layer.
public MapVisualElement HitTest(PointL point)
The point.
Returns:MapVisualElement.
Invalidates the map element attached to this layer's viewport, when that viewport is a map element.
protected virtual void Invalidate()
Called when the location property of an overlay changes.
public virtual void OverlayLocationChanged(MapVisualElement overlay)
Paints the layer to the specified graphics.
public virtual void Paint(IGraphics graphics, IMapViewport viewport)
The graphics.
viewportIMapViewportThe viewport.
Removes an overlay and, when it belongs to this layer, clears its layer reference; a selected overlay is also removed from the map selection.
public bool Remove(MapVisualElement item)
The overlay to remove.
Returns:This method does not invalidate the viewport or refresh cached clusters. When clustering is active, previously generated clusters can continue to expose the removed overlay until they are regenerated.
Updates the colorizer color of all overlays.
public virtual void UpdateOverlaysColorizerColor()
Called when the viewport is updated.
public virtual void ViewportUpdated(IMapViewport viewport, ViewportChangeAction action)
The viewport.
actionViewportChangeActionThe action.