BaseMapElement
Provides the shared viewport, provider/layer collections, and input routing used by the main map and its overview map.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.RadMap.dll
Syntax:
public class BaseMapElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IMapViewport
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementBaseMapElement...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the BaseMapElement class.
public BaseMapElement()
Fields
Identifies the property that offsets the map image during viewport animations.
public static RadProperty TileOffsetProperty
Identifies the property that scales the map image during viewport animations.
public static RadProperty TileScaleProperty
Properties
Gets or sets the center of the viewport in geo coordinates.
public PointG Center { get; set; }
The center.
Implements:
Gets or sets the coordinates of the center of the viewport in pixels.
public PointL CenterPixel { get; set; }
The center pixel.
Implements:
Gets or sets a value indicating whether panning is allowed.
public bool EnablePanning { get; set; }
Gets or sets a value indicating whether zooming is allowed.
public bool EnableZooming { get; set; }
Gets or sets the input behavior that will handle the user input.
public MapInputBehavior InputBehavior { get; set; }
The input behavior.
Gets a value indicating whether an animation is active.
public bool IsAnimationActive { get; }
true if an animation is active; otherwise, false.
Gets a value indicating whether updates are suspended.
public bool IsUpdateSuspended { get; }
true if updates are suspended; otherwise, false.
Gets the layers collection of the map element.
public MapLayerCollection Layers { get; }
The layers.
Gets the number of wraparounds visible in the viewport.
public int NumberOfWraparounds { get; }
The number of wraparounds.
Implements:
Gets or sets the current pan offset of the viewport in pixels.
public SizeL PanOffset { get; set; }
The pan offset.
Implements:
Gets the providers collection of the map element.
public MapProviderCollection Providers { get; }
The providers.
Gets a collection of the selected elements.
public List<MapVisualElement> SelectedElements { get; }
The selected elements.
Gets or sets the tile offset. This property is used for animations of the viewport.
public SizeF TileOffset { get; set; }
The tile offset.
Gets or sets the tile scale. This property is used for animations of the viewport.
public SizeF TileScale { get; set; }
The tile scale.
Gets or sets the currently visible viewport in geo coordinates.
public RectangleG Viewport { get; set; }
The viewport.
Implements:
Gets or sets the viewport in pixels.
public RectangleL ViewportInPixels { get; set; }
The viewport in pixels.
Implements:
Gets or sets a value indicating whether wraparound is enabled.
public bool Wraparound { get; set; }
true if wraparound is enabled; otherwise, false.
Implements:
Methods
Suspends updates.
public void BeginUpdate()
Brings the specified geo point into the center of the viewport.
Calculates the best zoom level that will fit the specified rectangle and centers it in the viewport.
public virtual void BringIntoView(RectangleG rectangle)
The rectangle.
Calculates the pixel and geographic viewport from the final element size and raises a full viewport-change notification.
protected virtual void CalculateViewport(SizeF finalSize)
The final arranged size of the map element.
Configures the graphics settings for optimal tile rendering based on the tile provider's requirements.
protected virtual void ConfigureTileProviderGraphics(Graphics graphics, IMapTileProvider tileProvider)
The GDI+ graphics object to configure.
tileProviderIMapTileProviderThe tile provider that determines the transparency rendering mode.
Releases the input behavior owned by this map element.
protected override void DisposeManagedResources()
Overrides:
Resumes updates and performs an update.
public void EndUpdate()
Resumes updates and performs an update if specified by the update parameter.
Enables painting and input handling, initializes viewport animation state, and creates the layer collection.
protected override void InitializeFields()
Overrides:
Forwards double-click input to the configured InputBehavior after base processing.
Forwards gesture input to the configured InputBehavior after base processing.
protected override void OnGesture(GestureEventArgs args)
Overrides:
Forwards key-down input to the configured InputBehavior after base processing.
Forwards key-press input to the configured InputBehavior after base processing.
Forwards key-up input to the configured InputBehavior after base processing.
Forwards mouse-down input to the configured InputBehavior after base processing.
Forwards mouse-enter input to the configured InputBehavior after base processing.
Forwards mouse-hover input to the configured InputBehavior after base processing.
Forwards mouse-leave input to the configured InputBehavior after base processing.
Forwards mouse-move input to the configured InputBehavior after base processing.
Forwards mouse-up input to the configured InputBehavior after base processing.
Forwards mouse-wheel input to the configured InputBehavior after base processing.
Forwards pan-gesture input to the configured InputBehavior after base processing.
protected override void OnPanGesture(PanGestureEventArgs args)
Overrides:
Forwards press-and-tap input to the configured InputBehavior after base processing.
protected override void OnPressAndTapGesture(PressAndTapGestureEventArgs args)
Overrides:
Recalculates the pan offset and viewport when the element's bounds change.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Overrides:
Called when a map provider is initialized.
public virtual void OnProviderInitializationComplete(IMapProvider mapProvider)
The map provider.
Called when a provider updated occurs.
public virtual void OnProviderUpdated(IMapProvider mapProvider)
The map provider that was updated.
Forwards rotate-gesture input to the configured InputBehavior after base processing.
protected override void OnRotateGesture(RotateGestureEventArgs args)
Overrides:
Called when a zoom animation finishes.
protected virtual void OnScaleAnimationFinished(object sender, AnimationStatusEventArgs e)
The sender.
eAnimationStatusEventArgsThe AnimationStatusEventArgs instance containing the event data.
Fires the event.
protected virtual void OnSelectionChanged(MapSelectionChangedEventArgs e)
The MapSelectionChangedEventArgs instance containing the event data.
Forwards two-finger-tap input to the configured InputBehavior after base processing.
protected override void OnTwoFingerTapGesture(GestureEventArgs args)
Overrides:
Called after the viewport changes.
protected virtual void OnViewportChanged(ViewportChangeAction action)
The change action.
Fires the event.
protected virtual void OnViewportChanged(ViewportChangedEventArgs e)
The ViewportChangedEventArgs instance containing the event data.
Forwards zoom-gesture input to the configured InputBehavior after base processing.
protected override void OnZoomGesture(ZoomGestureEventArgs args)
Overrides:
Paints the element, the providers content and the layers.
protected virtual void PaintElement(IGraphics graphics)
The graphics.
Paints the content of the layers.
Paints the content of the providers.
protected virtual void PaintProvidersContent(IGraphics graphics)
The graphics.
Paints the zoom image whild a zoom animation is ongoing.
protected virtual void PaintZoomImage(IGraphics graphics)
The graphics.
Pans the viewport with the specified delta.
Reapplies the current pan offset using the map-size and viewport constraints.
protected virtual void UpdatePanOffset()
Recalculates the pixel and geographic viewport bounds and, when wrapping is enabled, the visible world-copy count.
protected virtual void UpdateViewport()
Events
Occurs when the selection changed.
public event EventHandler<MapSelectionChangedEventArgs> SelectionChanged
Occurs when the viewport changed.
public event EventHandler<ViewportChangedEventArgs> ViewportChanged